it happens that some system headers on VMS have #pragma between parameters.  
This is spotted by building the Ada runtime.

This patch simply handles them.

Manually tested by building for ia64-hp-openvms.
No regressions for c on x86_64-darwin.

Ok for trunk ?


2012-03-14  Tristan Gingold  <ging...@adacore.com>

        * c-parser.c (c_parser_parameter_declaration): Handle #pragma
        before a parameter.

diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 56134c2..0d6f7a4 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -3305,6 +3305,11 @@ c_parser_parameter_declaration (c_parser *parser, tree at
   tree prefix_attrs;
   tree postfix_attrs = NULL_TREE;
   bool dummy = false;
+  /* Accept #pragmas between parameter declarations.  */
+  while (c_parser_next_token_is (parser, CPP_PRAGMA))
+    c_parser_pragma (parser, pragma_external);
   if (!c_parser_next_token_starts_declspecs (parser))
       c_token *token = c_parser_peek_token (parser);

Reply via email to