[Bug c++/59001] New: Use of -pedantic throws errors instead of warnings

asankau at millenniumit dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 5 10:20:00 GMT 2013


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

            Bug ID: 59001
           Summary: Use of -pedantic throws errors instead of warnings
           Product: gcc
           Version: 4.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asankau at millenniumit dot com

CODE : 
int main ( int argc , char* argv[])
{

        int iSz = 10;
        char zBuff1[iSz];

        return 0;

}

COMPILES WITHOUT -PEDANTIC
>g++ -c PedanticTest.cpp


DOES NOT COMPILE WITH -PEDANTIC
>g++ -pedantic -c PedanticTest.cpp
PedanticTest.cpp: In function 'int main(int, char**)':
PedanticTest.cpp:6: error: ISO C++ forbids variable length array 'zBuff1'



More information about the Gcc-bugs mailing list