http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50365
Bug #: 50365 Summary: invalid use of non-static data member not suppressed by -fpermissive Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: howa...@nitro.med.uc.edu Created attachment 25248 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25248 preprocessed source file for common/xplorSimulation.cc Current gcc trunk produces the compile time error (not present in gcc 4.6 or earlier) when compiling common/xplorSimulation.cc from xplor-nih 2.27... [MacPro:~/xplor-nih-2.27/common/bin.Darwin_11_x86_64] howarth% g++-fsf-4.7 -c xplorSimulation.cc -O3 -ffast-math -funroll-loops -g -DX_MMAP_FLAGS=0 -DFORTRAN_INIT -fno-common -DDARWIN -D_REENTRANT -DNDEBUG -I/Users/howarth/xplor-nih-2.27/common/ -I/Users/howarth/xplor-nih-2.27/arch/Darwin_11_x86_64/include -I/Users/howarth/xplor-nih-2.27/CDSlib -I/Users/howarth/xplor-nih-2.27/intVar -I/Users/howarth/xplor-nih-2.27/pcre -DCPLUSPLUS -DUSE_CDS_NAMESPACE -I/Users/howarth/xplor-nih-2.27/common/ -I/Users/howarth/xplor-nih-2.27/arch/Darwin_11_x86_64/include xplorSimulation.cc: In constructor ‘XplorSimulation::XplorSimulation(bool)’: xplorSimulation.cc:53:26: error: cannot call member function ‘XplorVars* XplorSimulation::xplorVars()’ without object /Users/howarth/xplor-nih-2.27/common/xplorSimulation.hh:138:7: error: invalid use of non-static data member ‘XplorSimulation::scriptingIndex_’ xplorSimulation.cc:54:6: error: from this location /Users/howarth/xplor-nih-2.27/common/xplorSimulation.hh:138:7: error: invalid use of non-static data member ‘XplorSimulation::scriptingIndex_’ xplorSimulation.cc:56:7: error: from this location which isn't suppressed with -fpermissive... [MacPro:~/xplor-nih-2.27/common/bin.Darwin_11_x86_64] howarth% g++-fsf-4.7 -c xplorSimulation.ii -O3 -ffast-math -funroll-loops -g -fpermissive -DX_MMAP_FLAGS=0 -DFORTRAN_INIT -fno-common -DDARWIN -D_REENTRANT -DNDEBUG -DCPLUSPLUS -DUSE_CDS_NAMESPACExplorSimulation.cc: In constructor ‘XplorSimulation::XplorSimulation(bool)’:xplorSimulation.cc:53:26: error: cannot call member function ‘XplorVars* XplorSimulation::xplorVars()’ without object/Users/howarth/xplor-nih-2.27/common/xplorSimulation.hh:138:7: error: invalid use of non-static data member ‘XplorSimulation::scriptingIndex_’ xplorSimulation.cc:54:6: error: from this location /Users/howarth/xplor-nih-2.27/common/xplorSimulation.hh:138:7: error: invalid use of non-static data member ‘XplorSimulation::scriptingIndex_’ xplorSimulation.cc:56:7: error: from this location Is this behavior expected or shouldn't this new error be suppressible with the -fpermissive flag?