ObjFW  Check-in [7d9ac574a8]

Overview
Comment:configure: Check if assert is buggy with -pedantic
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7d9ac574a889bfa0fe3418593c042f8b95d214511301aadc0dd4d4d1ecd50fb8
User & Date: js on 2017-03-12 00:31:53
Other Links: manifest | tags
Context
2017-03-12
00:58
OFMutableString: Check more arguments for nil check-in: 696bc0d890 user: js tags: trunk
00:31
configure: Check if assert is buggy with -pedantic check-in: 7d9ac574a8 user: js tags: trunk
2017-02-27
22:04
OFLocalization: Don't lower language and territory check-in: 0e82e3b843 user: js tags: trunk
Changes

Modified configure.ac from [e97c0cc79e] to [abed6f0dda].

1390
1391
1392
1393
1394
1395
1396


1397
1398
1399
1400
1401
1402
1403












1404
1405
1406
1407
1408
1409
1410
	AS_IF([test x"$check_pedantic" = x"yes"], [
		old_OBJCFLAGS="$OBJCFLAGS"
		OBJCFLAGS="$OBJCFLAGS -pedantic"
		AC_MSG_CHECKING(whether -pedantic is buggy)
		AC_TRY_COMPILE([
			#include <stdlib.h>



			@interface Foo
			{
				void *foo;
			}
			@end

			@interface Bar: Foo












			@end
		], [], [
			AC_MSG_RESULT(no)
		], [
			AC_MSG_RESULT(yes)
			OBJCFLAGS="$old_OBJCFLAGS"
		])







>
>







>
>
>
>
>
>
>
>
>
>
>
>







1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
	AS_IF([test x"$check_pedantic" = x"yes"], [
		old_OBJCFLAGS="$OBJCFLAGS"
		OBJCFLAGS="$OBJCFLAGS -pedantic"
		AC_MSG_CHECKING(whether -pedantic is buggy)
		AC_TRY_COMPILE([
			#include <stdlib.h>

			#include <assert.h>

			@interface Foo
			{
				void *foo;
			}
			@end

			@interface Bar: Foo
			- (void)assert;
			@end

			@implementation Bar
			- (void)assert
			{
				/*
				 * Some versions of glibc break with -pedantic
				 * when using assert.
				 */
				assert(1);
			}
			@end
		], [], [
			AC_MSG_RESULT(no)
		], [
			AC_MSG_RESULT(yes)
			OBJCFLAGS="$old_OBJCFLAGS"
		])