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: unassig...@gcc.gnu.org

        ReportedBy: ja...@gcc.gnu.org

                CC: ja...@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?

Reply via email to