This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-1.1.1 stuff


> Date: Wed, 4 Nov 1998 22:20:22 +0100
> From: Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>
> Cc: law@cygnus.com, egcs@cygnus.com
> 
> > implicit.C:3: warning: implicit declaration of function `int foo(...)'
> [...]
> > This is actually quite important -- the C++ spec emphasizes that functions
> > must be explicitly declared, and this failure to flag an error causes us some
> > trouble with generated code that really does need to be flagged.
> 
> The C++ spec does not talk about errors and warnings. Instead, it
> requires that an implementation should produce *diagnostic
> message*. It is implementation-defined what constitutes these
> diagnostics. For g++, diagnostics include error and warning message.
> 
> As Jason points out, -pedantic-errors turns warnings into errors.

Unfortunately, this really isn't very useful to us.  -pedantic-errors also
rejects 'long long', a common C++ extension.  There are certain C++ extensions
that we're aware are extensions (such as long long) that we use carefully.

This, on the other hand, causes us real grief.  It makes it hard for us to use
egcs/g++ to verify that a program compiles correctly.

Can you please consider making this consistent with common C++ practice
elsewhere?  What possible advantage is it (other than compiling legacy C code,
which doesn't apply to C++) to accept undeclared functions?

-- 
Robert Krawitz <rlk@tiac.net>	       http://www.tiac.net/users/rlk/

Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf@uunet.uu.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]