Mail Archives: djgpp/2000/08/07/03:39:20
On Mon, 7 Aug 2000, Damian Yerrick wrote:
> >I think -ansi and -pedantic are not important for this.
>
> They might not, but the OP can't see the grader script, and the grader
> might not be using GCC. Several errors that show up in (for example)
> MSVC at default settings need -ansi -pedantic in GCC.
Since the GCC project generally dislikes -ansi and -pedantic, expect
them to introduce limitations in the compiler's otherwise excellent
diagnostics. In addition, -ansi might pop up warnings in otherwise valid
programs, which would unnecessarily confuse inexperienced users. I think
turning on all the -W* options will produce much more warnings than -ansi
and -pedantic ever could.
So I don't recommend using those switches.
The argument about other compilers is IMHO not an important consideration,
because no two compilers emit the same warnings for the same program. If
the course curricula at all allow use of different compilers, they cannot
be too picky about warnings. If they _are_ picky, the only way out is to
use the same compiler as the grader.
- Raw text -