public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55878] New: [4.7/4.8 Regression] --enable-checking=yes rejection of typeid
@ 2013-01-04 17:50 jakub at gcc dot gnu.org
  2013-01-07 10:13 ` [Bug c++/55878] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-04 17:50 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55878
           Summary: [4.7/4.8 Regression] --enable-checking=yes rejection
                    of typeid
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: jason@gcc.gnu.org


// { dg-do compile }
// { dg-options "-std=gnu++0x" }

#include <typeinfo>

struct S;

template <typename T>
static bool fn (S *s)
{
  return typeid (*s) == typeid (T);
}

struct S
{
};

bool x = fn<S> (__null);

is rejected with --enable-checking=yes compilers (but accepted with release
checking compilers), starting with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173679

Is this code valid C++ or not, i.e. is the FE allowed to warn about incomplete
types even in the uninstantiated template?


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

end of thread, other threads:[~2013-01-10  2:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-04 17:50 [Bug c++/55878] New: [4.7/4.8 Regression] --enable-checking=yes rejection of typeid jakub at gcc dot gnu.org
2013-01-07 10:13 ` [Bug c++/55878] " rguenth at gcc dot gnu.org
2013-01-07 15:48 ` rguenth at gcc dot gnu.org
2013-01-07 22:40 ` jason at gcc dot gnu.org
2013-01-10  2:52 ` jason at gcc dot gnu.org
2013-01-10  2:55 ` jason at gcc dot gnu.org
2013-01-10  2:59 ` jason at gcc dot gnu.org

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).