This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] In C99, 'inline' may be doubled
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Michael Matz <matz at suse dot de>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 14 Mar 2003 18:23:05 +0000 (GMT)
- Subject: Re: [patch] In C99, 'inline' may be doubled
On Fri, 14 Mar 2003, Michael Matz wrote:
> > I can see no reason for duplicate inline to be accepted in gnu89 mode.
>
> It doesn't. Read the patch.
>
> % ./devel/gcc/cc1 -std=gnu89 inline-test.c
> inline-test.c:1: warning: duplicate `inline'
> inline-test.c:4: warning: duplicate `inline'
That's accepting it. It should be (and I think was) a hard error in gnu89
mode.
> I only wanted to fix one certain testcase, that it at least is accepted
> syntax wise. Implementing also the correct semantic was not the goal.
I consider this of marginal utility, but also doubt that someone is going
to implement a configure test that uses acceptance of "inline inline" to
decide whether the compiler has C99 inline, so a patch that keeps the hard
error in gnu89 mode (with a testcase that it is a hard error in gnu89
mode) will be accepted.
(The last patch to accept C99 syntax without implementing the semantics -
RTH's conditioning the pedwarn-if-pedantic for VLAs on not being in C99
mode - just swapped one set of complaints (about the pedwarn in C99 mode)
for another (that the cases not permitted by C99 didn't get warned for at
all).)
--
Joseph S. Myers
jsm28 at cam dot ac dot uk