X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fpumpkin.pod;h=0146f6804662328d38073768768983c992c0ec14;hb=93189314521460c01625b05f7cfa81ac855affa9;hp=cff54cdf10999bce58ee49a0721dcaca7de0cb9e;hpb=a29f6d035abe7b06489dad2706479b252a072f02;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod index cff54cd..0146f68 100644 --- a/Porting/pumpkin.pod +++ b/Porting/pumpkin.pod @@ -769,6 +769,44 @@ clean up, and print warnings from the log files (-Wformat support by Robin Barker.) +=item gcc -ansi -pedantic + +Configure -Dgccansipedantic [ -Dcc=gcc ] will enable (via the cflags script, +not $Config{ccflags}) the gcc strict ANSI C flags -ansi and -pedantic for +the compilation of the core files on platforms where it knows it can +do so (like Linux, see cflags.SH for the full list), and on some +platforms only one (Solaris can do only -pedantic, not -ansi). +The flag -DPERL_GCC_PEDANTIC also gets added, since gcc does not add +any internal cpp flag to signify that -pedantic is being used, as it +does for -ansi (__STRICT_ANSI__). + +The -ansi and -pedantic are useful in catching at least the following +nonportable practices: + +=over 4 + +=item * + +gcc-specific extensions + +=item * + +lvalue casts + +=item * + +// C++ comments + +=item * + +enum trailing commas + +=back + +The -Dgccansipedantic should be used only when cleaning up the code, +not for production builds, since otherwise gcc cannot inline certain +things. + =back =head1 Running Purify