Results 1 to 2 of 2
I have heard that gcc/g++ is not good enough. It allows a lot of stuff that it shouldn't; i.e
int x=5;
int a[x];
Are there any other good compiler out ...
- 06-07-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 5
Best compiler for C/C++?
I have heard that gcc/g++ is not good enough. It allows a lot of stuff that it shouldn't; i.e
int x=5;
int a[x];
Are there any other good compiler out there?
- 06-08-2011 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
Good enough for what? It's definitely not very good as an airbag. Darn walls.
- There have been a lot of extensions made to C. Pretty much all compilers allow things they "shouldn't". Whether that makes the compiler less "good" is a matter of opinion.
- You can get gcc to be standards compliant by using the -pedantic flag. If you want to conform to a particular ISO C standard, you also need to specify -std=c89 or -std=c99 (the default is -std=gnu89, i.e. C89 with GNU extensions such as the variable-length array you demonstrated above).


Reply With Quote
