[llvm-commits] [llvm-gcc-4.2] r100565 - /llvm-gcc-4.2/trunk/gcc/c-parser.c

Bob Wilson bob.wilson at apple.com
Tue Apr 6 14:56:06 PDT 2010


Author: bwilson
Date: Tue Apr  6 16:56:05 2010
New Revision: 100565

URL: http://llvm.org/viewvc/llvm-project?rev=100565&view=rev
Log:
Disable the "ISO C forbids braced-groups within expressions" pedantic
warning.  This is needed for llvm's implementation of the ARM NEON intrinsics,
which use macros with statements expressions instead of inline functions.
This warning made is impossible to compile NEON intrinsics with "-pedantic
-Werror".  Radar 7833512.

Modified:
    llvm-gcc-4.2/trunk/gcc/c-parser.c

Modified: llvm-gcc-4.2/trunk/gcc/c-parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-parser.c?rev=100565&r1=100564&r2=100565&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-parser.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-parser.c Tue Apr  6 16:56:05 2010
@@ -5643,8 +5643,17 @@
 	  c_parser_compound_statement_nostart (parser);
 	  c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
 				     "expected %<)%>");
+/* LLVM LOCAL begin */
+          /* Disable this warning for the sake of ARM NEON intrinsics, which
+             are implemented as macros with statement expressions in llvm-gcc
+             since the inliner is not run later and the arguments need to be
+             visible to the front-end.  Otherwise, it is not possible to
+             compile NEON intrinsics with "-pedantic -Werror".  */
+#ifndef ENABLE_LLVM
 	  if (pedantic)
 	    pedwarn ("ISO C forbids braced-groups within expressions");
+#endif
+/* LLVM LOCAL end */
 	  expr.value = c_finish_stmt_expr (stmt);
 	  expr.original_code = ERROR_MARK;
 	}





More information about the llvm-commits mailing list