This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs / g++ conflicts c++ draft standard (i think)
- To: egcs at cygnus dot com
- Subject: egcs / g++ conflicts c++ draft standard (i think)
- From: "Frederico A. C. Neves" <fneves at excon dot com dot br>
- Date: 24 Jul 1998 17:31:15 -0300
Could please someone tell me where can i find a list of non
standard c++ features supported by g++. Following are this 2 samples
discovered because we have to port to WinNT and VC++5 don't compile
this code.
-- Initialization of const data member inside class definition
//conflicts Stroustrup: C++ Programming Language 3ed - 10.4.6.2
class foo
{
....
const int qtd = 100;
....
};
-- end
-- Dynamic allocation of array bounds (no const bounds)
//conflicts Stroustrup: C++ Programming Language 3ed - 5.2
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char** argv)
{
int size;
if(argc > 1)
size = atoi(argv[1]);
else
size = 100;
int dynarray[size];
for(int j=0; j<size; ++j)
dynarray[j] = j;
printf("last array element %d\n", dynarray[size-1]);
return 0;
}
-- end
This 2 samples compile and work without a warning with g++
2.7.2.1 and egcs on Linux with libc5 and glibc2.
Thanks in advance
Frederico Neves
--
----------------------------------------------------------------
Frederico A. C. Neves ExCon Consultoria em Sistemas Ltda
<fneves@ExCon.com.BR> R.Maestro Cardim 560 - 25
Tel/Fax +55-11-253-0043 Sao Paulo - SP - Brazil - 01323-000