•
How to make sure that onlystandard C constructs are used in a program?
–
Using the right C compiler flags:
•
gcc
, cc
–
‘-
ansi
’: ISOC90 programs.
–
‘-
ansi
’ +‘-pedantic’: reject non-ISO programs
–
‘-std=c99’: ISO C99 programs
–
‘man
gcc
’ formore information.
•
Using ANSI C, the code must pass ‘–Wall –
ansi
–pedantic’ with no warning messages
All programs in this course must be compiled with ‘-Wall –
ansi
–pedantic’ or ‘-Wall –std=xxx –pedantic’unless you know a specific reason to not use such flags