On Mar 20, 8:42 am, Antony Sidwell <ant...@[EMAIL PROTECTED]
> wrote:
> roustk wrote:
> > Actually, having just tried this, -pedantic doesn't seem to do it. I
now
> > get warnings about C++ style comments, but nothing more. I'll play
> > with Shanoah's full list, though. (Pointer arithmetic is bad? We're
in
> > trouble...)
>
> Just a quick summary of the warnings enabled there, and why you do or
> don't want to use the options (all IMO obviously)...
>
> -pedantic is a good one if you want your code to be ****table. Without
> it, you're not going to get warned about various actually illegal (in
> the sense of non-standard) constructions.
>
> -Wall turns on a whole load of mostly useful warnings - particularly
> warnings of possible initialised variables, unused "static" functions,
> and so on.
>
> -Wextra turns on a few warnings such as -Wmissing-parameter-type and
> -Wold-style-declaration that can be useful sometimes, but also a couple
> of no particular use, and one you really want to turn off (see
> missing-field-initializers).
I am glad to hear this. I agree that missing-field-initializers is
particularly annoying. And unused-parameters just highlights a defect
in C vis a vis C++.


|