From 5b48d9bbd702cd2c0a0863c898b3d4b120daf256 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 12 Nov 2011 13:36:53 -0700 Subject: [PATCH] perlhack: in-line functions need extra care --- pod/perlhack.pod | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 0dccf9a6f1..e5347ff074 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -387,6 +387,15 @@ Do not declare variables using "register". It may be counterproductive with modern compilers, and is deprecated in C++, under which the Perl source is regularly compiled. +=item * + +In-line functions that are in headers that are accessible to XS code +need to be able to compile without warnings with commonly used extra +compilation flags, such as gcc's C<-Wswitch-default> which warns +whenever a switch statement does not have a "default" case. The use of +these extra flags is to catch potential problems in legal C code, and is +often used by Perl aggregators, such as Linux distributors. + =back =head3 Test suite -- 2.34.1