["Followup-To:" header set to comp.lang.c++.] On Wed, 2012-03-28, Alex Vinokur wrote: > Hi, > > While compiling program below, behavior of g++ differs from Intel and > aCC HP compilers. > g++ detects error. ... >> icpc test1.cpp > // No errors > >> aCC test1.cpp > // No errors > >> g++ test1.cpp
At least with g++, you really *need* to provide flags to set the warning level and C++ standard level, if you're at all interested in getting warnings about broken code. A good starting point: g++ -Wall -Wextra -pedantic -Wold-style-cast -std=c++98 -O3 I expect the other two compilers to behave in a similar way. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org https://lists.gnu.org/mailman/listinfo/help-gplusplus