New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Avoid gratuitous warning from -Wundef #17181
Comments
From peter@eisentraut.orgThis is a bug report for perl from peter@eisentraut.org, Use #ifdef instead of #if to avoid warning if a user of this header Flags: Site configuration information for perl 5.30.0: Configured by brew at Thu May 30 18:27:37 BST 2019. Summary of my perl5 (revision 5 version 30 subversion 0) configuration: Platform: @INC for perl 5.30.0: Environment for perl 5.30.0: |
From peter@eisentraut.org0001-Avoid-gratuitous-warning-from-Wundef.patchFrom 01b79d136cc7d55f8f5b96d7f474847bae7bf0d8 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Sat, 12 Oct 2019 21:32:13 +0200
Subject: [PATCH] Avoid gratuitous warning from -Wundef
Use #ifdef instead of #if to avoid warning if a user of this header
file uses the gcc -Wundef option.
---
perl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl.h b/perl.h
index 13ab20a43f..8f6dca3d29 100644
--- a/perl.h
+++ b/perl.h
@@ -1468,7 +1468,7 @@ any magic.
#define UNKNOWN_ERRNO_MSG "(unknown)"
-#if VMS
+#ifdef VMS
#define Strerror(e) strerror((e), vaxc$errno)
#else
#define Strerror(e) strerror(e)
--
2.23.0
|
From @jkeenanOn Sat, 12 Oct 2019 19:51:10 GMT, peter@eisentraut.org wrote:
With each of gcc, g++ and clang, I first configured perl to have the compiler use -Wundef, then built perl and recorded warnings at the end of 'make'. I then applied the patch to a branch and repeated the process, again having each compiler use -Wundef. Results as expected; see attachment. Pushed to blead in commit d1747a5. Thank you very much.
-- |
From @jkeenan[p5p] 531 $ report-build-warnings make.blead.gcc.Wundef.output.txt Wimplicit-fallthrough= 35 [p5p] 532 $ report-build-warnings make.134494-Wundef.gcc.Wundef.output.txt Wimplicit-fallthrough= 35 [perlmonger: p5p] $ ~/bin/perl/report-build-warnings make.blead.g++.Wundef.output.txt Wformat-overflow= 2 [perlmonger: p5p] $ ~/bin/perl/report-build-warnings make.134494-Wundef.g++.Wundef.output.txt Wformat-overflow= 2 [p5p] 533 $ report-build-warnings make.blead.clang.Wundef.output.txt Wtautological-constant-out-of-range-compare 2 [p5p] 534 $ report-build-warnings make.134494-Wundef.clang.Wundef.output.txt Wtautological-constant-out-of-range-compare 2 |
The RT System itself - Status changed from 'new' to 'open' |
@jkeenan - Status changed from 'open' to 'pending release' |
Migrated from rt.perl.org#134494 (status was 'pending release')
Searchable as RT134494$
The text was updated successfully, but these errors were encountered: