This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: unnamed #pragma fails to compile
- To: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Subject: Re: unnamed #pragma fails to compile
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Fri, 25 Feb 2000 13:16:42 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <orema1a5p4.fsf@garnize.lsd.ic.unicamp.br>
On Fri, Feb 25, 2000 at 08:21:11AM -0300, Alexandre Oliva wrote:
> The following testcase, just installed in the testsuite, fails to
> compile with the current CVS.
>
> Here's a patch that arranges for unnamed pragmas to be accepted, as
> required by the C Standard. Ok to install?
Well, technically, a pragma with no tokens causes implementation-
defined behavior, but it would seem to fall under the category of
'unrecognized pragmas must be ignored'. The wording in this segment
could be a lot better.
So the intent of the patch is fine. I don't like the implementation -
what's with the spaghetti code? You appear to have been trying to
remove the duplicate cleanup code, but I would rather you leave it
duplicated and not put a goto into the middle of a conditional block.
Furthermore, the name skip_no_error is misleading since you don't
actually call skip_rest_of_line. Just put an 'empty' label right
after the skip_rest_of_line call at the end of the function, and go
straight there from if (token == CPP_VSPACE).
With that change, the patch is approved.
zw