Rolf Magnus wrote:
Larry I Smith wrote:
GCC g++ v3.3.4 compiles both of these statements without error
or warning (even with '-Wall -ansi -pedantic' compile options):
You forgot to add -W to the options.
const static int ARRAY_SIZE1 = 4;
With -W, it says:
"warning: `static' is not at beginning of declaration"
Hmm, you are correct.
Thanks for the info about '-W'.
The doc supplied with g++ v3.3.4 ('info GCC') does not
mention '-W'. It does discuss many '-W...' options
that can all be enabled via '-Wall' and disabled with
'-w' (lowercase).
It seems that '-W -Wall' needs to be specified to
turn on all warnings. The '-Wall' switch name is
misleading - it doesn't enable 'all' warnings.
Sadly, it appears that the GCC docs are incomplete.
Regards,
Larry
--
Anti-spam address, change each 'X' to '.' to reply directly.