summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
Diffstat (limited to 'Porting')
-rw-r--r--Porting/pumpkin.pod38
1 files changed, 38 insertions, 0 deletions
diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod
index cff54cdf10..0146f68046 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