diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-09-18 04:19:25 +0300 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-09-26 09:15:55 +0000 |
commit | 93189314521460c01625b05f7cfa81ac855affa9 (patch) | |
tree | 0daf409e1e27efb5bda55df447292e5f02193f4a /Porting/pumpkin.pod | |
parent | a29f6d035abe7b06489dad2706479b252a072f02 (diff) | |
download | perl-93189314521460c01625b05f7cfa81ac855affa9.tar.gz |
enable -ansi -pedantic
Message-ID: <20020917221925.GF85044@lyta.hut.fi>
p4raw-id: //depot/perl@17925
Diffstat (limited to 'Porting/pumpkin.pod')
-rw-r--r-- | Porting/pumpkin.pod | 38 |
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 |