public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51290] New: Bogus warning: zero as null pointer constant
@ 2011-11-24  1:37 us15 at os dot inf.tu-dresden.de
  2011-11-24  3:44 ` [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast paolo.carlini at oracle dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: us15 at os dot inf.tu-dresden.de @ 2011-11-24  1:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51290

             Bug #: 51290
           Summary: Bogus warning: zero as null pointer constant
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: us15@os.inf.tu-dresden.de


Created attachment 25906
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25906
Testcase

When compiling the attached testcase:

gcc -std=gnu++11 -c -W -Wall -Wzero-as-null-pointer-constant testcase.cc -o
testcase.o

gcc emits the following bogus warning:

testcase.cc: In static member function 'static void C::bar(B*)':
testcase.cc:16:38: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast
  2011-11-24  1:37 [Bug c++/51290] New: Bogus warning: zero as null pointer constant us15 at os dot inf.tu-dresden.de
@ 2011-11-24  3:44 ` paolo.carlini at oracle dot com
  2011-11-24 10:57 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-24  3:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51290

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-11-24
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-24 00:37:08 UTC ---
Ok, thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast
  2011-11-24  1:37 [Bug c++/51290] New: Bogus warning: zero as null pointer constant us15 at os dot inf.tu-dresden.de
  2011-11-24  3:44 ` [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast paolo.carlini at oracle dot com
@ 2011-11-24 10:57 ` paolo at gcc dot gnu.org
  2011-11-24 11:01 ` paolo.carlini at oracle dot com
  2011-11-24 13:23 ` us15 at os dot inf.tu-dresden.de
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-11-24 10:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51290

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-11-24 10:20:49 UTC ---
Author: paolo
Date: Thu Nov 24 10:20:43 2011
New Revision: 181690

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181690
Log:
/cp
2011-11-24  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51290
    * class.c (build_base_path): For the null pointer check use
    nullptr_node instead of integer_zero_node.

/testsuite
2011-11-24  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51290
    * g++.dg/warn/Wzero-as-null-pointer-constant-3.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wzero-as-null-pointer-constant-3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast
  2011-11-24  1:37 [Bug c++/51290] New: Bogus warning: zero as null pointer constant us15 at os dot inf.tu-dresden.de
  2011-11-24  3:44 ` [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast paolo.carlini at oracle dot com
  2011-11-24 10:57 ` paolo at gcc dot gnu.org
@ 2011-11-24 11:01 ` paolo.carlini at oracle dot com
  2011-11-24 13:23 ` us15 at os dot inf.tu-dresden.de
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-24 11:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51290

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-24 10:21:46 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast
  2011-11-24  1:37 [Bug c++/51290] New: Bogus warning: zero as null pointer constant us15 at os dot inf.tu-dresden.de
                   ` (2 preceding siblings ...)
  2011-11-24 11:01 ` paolo.carlini at oracle dot com
@ 2011-11-24 13:23 ` us15 at os dot inf.tu-dresden.de
  3 siblings, 0 replies; 5+ messages in thread
From: us15 at os dot inf.tu-dresden.de @ 2011-11-24 13:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51290

--- Comment #4 from Udo Steinberg <us15 at os dot inf.tu-dresden.de> 2011-11-24 12:04:58 UTC ---
Confirmed to be fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-24 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-24  1:37 [Bug c++/51290] New: Bogus warning: zero as null pointer constant us15 at os dot inf.tu-dresden.de
2011-11-24  3:44 ` [Bug c++/51290] Bogus warning: zero as null pointer constant with static_cast paolo.carlini at oracle dot com
2011-11-24 10:57 ` paolo at gcc dot gnu.org
2011-11-24 11:01 ` paolo.carlini at oracle dot com
2011-11-24 13:23 ` us15 at os dot inf.tu-dresden.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).