This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: C++ PATCH to cp/decl.c: Timing name lookup


On Fri, 14 Feb 2003, Jason Merrill wrote:

> On Thu, 13 Feb 2003 23:26:49 +0000 (GMT), "Joseph S. Myers" <jsm28@cam.ac.uk> wrote:
> 
> > On Thu, 13 Feb 2003, Jason Merrill wrote:
> >
> >> It's not spurious.  (0,0) is not a valid null pointer constant; an integral
> >> constant-expression may not contain a comma operator.
> >
> > And we ought to get rid of GCC's C extensions that allow such things 
> > without -pedantic.
> 
> Huh?  The warning was just about a conversion from integer to pointer.  No
> extensions involved.

The message <http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01067.html>
mentioned -pedantic being needed to generate the warning.  The
(undocumented, bogus) extension involved is that GCC counts (0,0) as an
integer constant expression (in C) unless -pedantic is used, which means
it is counted as a null pointer constant unless -pedantic is used, which
means it is silently converted to pointer type unless -pedantic is used.  
The warning instead ought to be unconditional.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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