c-decl.c (grokdeclarator): Correct comments about where storage class specifiers...
authorJoseph Myers <jsm@polyomino.org.uk>
Mon, 13 Sep 2004 21:00:33 +0000 (22:00 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 13 Sep 2004 21:00:33 +0000 (22:00 +0100)
commit61f4f1cc3d363590bec97bc8fb035064d617bd73
treeba99baf31dd5640c618debd8f6de5121f2512a34
parentb4cb0e432b123b1e152e9d35c0675495bde8fe72
c-decl.c (grokdeclarator): Correct comments about where storage class specifiers are rejected by grammar...

* c-decl.c (grokdeclarator): Correct comments about where storage
class specifiers are rejected by grammar and add corresponding
asserts.  Diagnose typedefs and parameters declared inline.
Change warning for inline main to a pedwarn.  Only diagnose inline
main if hosted.
(declspecs_add_scspec): Allow duplicate "inline".

testsuite:
* gcc.dg/declspec-7.c: Don't expect diagnostic for duplicate
"inline".
* gcc.dg/declspec-11.c: Update expected messages.
* gcc.dg/inline-6.c, gcc.dg/inline-7.c, gcc.dg/inline-8.c,
gcc.dg/inline-9.c, gcc.dg/inline-10.c, gcc.dg/inline-11.c,
gcc.dg/inline-12.c: New tests.

From-SVN: r87450
12 files changed:
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/declspec-11.c
gcc/testsuite/gcc.dg/declspec-7.c
gcc/testsuite/gcc.dg/inline-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-12.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/inline-9.c [new file with mode: 0644]