[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GACK!
From: |
Bruce Lilly |
Subject: |
Re: GACK! |
Date: |
Fri, 06 Sep 2002 18:36:09 -0400 |
John Millaway wrote:
> That's not what's supposed to happen. Let's make sure we are on the same page
> when we speak about "prototypes" and "definitions", because it's easy to
> confuse the issue. To clarify, this is what you are supposed to get by
> default:
>
> // prototype
> int foo(int, char*);
>
> // C89 definition
> int foo (x.y)
> int x; char* y;
> {
> ....
> }
It's the definitions which are the issue (which are K&R C, not
ANSI C89). The compiler diagnostics were like:
lex.mail.c(9853) : warning C4131: 'yy_get_next_buffer' : uses old-style
declarator
which refers to the definition (after preprocessing):
static int yy_get_next_buffer (yyscanner) yyscan_t yyscanner;
> > This is really, really bad. In a project with 60 object files, it
> > is unreasonable to have to specify the extraordinarily verbose
> > -DYY_NO_TRADITIONAL_FUNC_DEFS for all compilations when it ought not
> > to be needed for any object files (i.e. the project in question is
> > not "bootstrapping gcc"). A separate compilation command in a
> > makefile for the flex object isn't possible with gmake, because
> > gmake overrides it with the recipe based on SUFFIXES.
>
> Huh? Just add the following line in your gmake Makefile:
>
> CPPFLAGS += -DYY_NO_TRADITIONAL_FUNC_DEF
That's the "extraordinarily verbose ... for all compilations"
issue.
Thanks for the fix.