This is the mail archive of the gcc-bugs@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]

[Bug c++/57044] New: The following code won't compile with -std=c++0x


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

             Bug #: 57044
           Summary: The following code won't compile with -std=c++0x
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pberuto@yahoo.com


The following code causes a GCC internal error Segmentation fault:

class myclass
{
public:
   template<typename T_>
   inline explicit myclass(T_ *s)
   {
      char buf[mylib::someclass::some_const]; // this line causes the fault
      // ... do something useful with buf
   }

   ...      
};

// somewhere else:
nemaspace mylib
{
   class someclass
   {
   public:
      static const uint32_t some_const;
   }
}

// other info:
all GCC versions from 4.5.3 and below compile that code fine. Not tested with
other gcc versions before 4.7.2.
compile flags are CXXFLAGS="-g -O0 -pipe -std=c++0x"

Thank you.


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