Re: Tired of -Wold-style-definition already - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Tired of -Wold-style-definition already
Date
Msg-id 1100734997.26213.1.camel@localhost.localdomain
Whole thread Raw
In response to Re: Tired of -Wold-style-definition already  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Tired of -Wold-style-definition already  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2004-11-17 at 14:59 -0500, Tom Lane wrote:
> > Would it not be possible to suppress the warnings just for the 
> > flex-generated code?
> 
> IMHO it's not worth the trouble.

I think this is the better course. At least here, flex-generated files
produce warnings even without -Wold-style-definition:

% gcc -O2 -Wall -Wmissing-prototypes -fno-strict-aliasing -g -I.
-I../../../src/include -D_GNU_SOURCE   -c -o gram.o gram.c
-MMD                                                    
In file included from gram.y:8445:
scan.c:6065: warning: no previous prototype for 'base_yyget_lineno'
scan.c:6074: warning: no previous prototype for 'base_yyget_in'
scan.c:6082: warning: no previous prototype for 'base_yyget_out'
scan.c:6090: warning: no previous prototype for 'base_yyget_leng'
scan.c:6099: warning: no previous prototype for 'base_yyget_text'
scan.c:6108: warning: no previous prototype for 'base_yyset_lineno'
scan.c:6120: warning: no previous prototype for 'base_yyset_in'
scan.c:6125: warning: no previous prototype for 'base_yyset_out'
scan.c:6130: warning: no previous prototype for 'base_yyget_debug'
scan.c:6135: warning: no previous prototype for 'base_yyset_debug'
scan.c:6141: warning: no previous prototype for 'base_yylex_destroy'
% flex --version
flex 2.5.31
% gcc --version
gcc-3.4 (GCC) 3.4.2 (Debian 3.4.2-3)
[...]

-Neil




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_resetxlog options
Next
From: Tom Lane
Date:
Subject: Re: Tired of -Wold-style-definition already