diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-10-06 14:29:51 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-10-13 08:09:16 +0200 |
commit | 135ed90333defee1f5341979cabe475c9d418d74 (patch) | |
tree | 927c576c12c3df1aa6334c38a87ac64a161d01cb /pod | |
parent | a66ca9982aad27a40050c19682786e25346fd8c4 (diff) | |
download | perl-135ed90333defee1f5341979cabe475c9d418d74.tar.gz |
Note how best to confirm that other C99 features can be relied upon
If C99 functionality can't be emulated on platforms which don't provide it,
then one really needs to test whether MSVC and the VMS compiler support it.
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlhacktips.pod | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 95fff12010..1f48d6c561 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -246,6 +246,26 @@ C<z> modifier, along with perl-specific formats such as C<SVf>.) =back +If you want to use a C99 feature not listed above then you need to do one of + +=over 4 + +=item * + +Probe for it in F<Configure>, set a variable in F<config.sh>, and add fallback logic in the headers for platforms which don't have it. + +=item * + +Write test code and verify that it works on platforms we need to support, before relying on it unconditionally. + +=back + +Likely you want to repeat the same plan as we used to get the current C99 +feature set. See the message at https://markmail.org/thread/odr4fjrn72u2fkpz +for the C99 probes we used before. Note that the two most "fussy" compilers +appear to be MSVC and the vendor compiler on VMS. To date all the *nix +compilers have been far more flexible in what they support. + On *nix platforms, F<Configure> attempts to set compiler flags appropriately. All vendor compilers that we tested defaulted to C99 (or C11) support. However, older versions of gcc default to C89, or permit I<most> C99 (with |