summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-02-10 10:35:31 -0700
committerKarl Williamson <khw@cpan.org>2021-02-11 12:58:44 -0700
commit639a7c3588769b76e7a726b2c099968b81ee4214 (patch)
tree64374dbfb369f9e4f0a597d50be7a03454cb2564 /locale.c
parentfcabef2537a4929bddd09a60c3aa32cd97c5dd88 (diff)
downloadperl-639a7c3588769b76e7a726b2c099968b81ee4214.tar.gz
locale.c: Silence compiler warning
Later gcc compilers warn on these intentional fall throughs in a switch(). Adding FALLTHROUGH would make things a lot less clear, so turn off the warnings around the whole switch.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/locale.c b/locale.c
index 8fa326d56e..de171fc6d1 100644
--- a/locale.c
+++ b/locale.c
@@ -2915,6 +2915,9 @@ S_my_nl_langinfo(const int item, bool toggle)
tm.tm_year = 2017 - 1900;
tm.tm_wday = 0;
tm.tm_mon = 0;
+
+ GCC_DIAG_IGNORE_STMT(-Wimplicit-fallthrough);
+
switch (item) {
default:
Perl_croak(aTHX_
@@ -3003,6 +3006,8 @@ S_my_nl_langinfo(const int item, bool toggle)
break;
}
+ GCC_DIAG_RESTORE_STMT;
+
/* We can't use my_strftime() because it doesn't look at
* tm_wday */
while (0 == strftime(PL_langinfo_buf, PL_langinfo_bufsize,