[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sr #108339] ICC wargings in generated files
From: |
Akim Demaille |
Subject: |
Re: [sr #108339] ICC wargings in generated files |
Date: |
Sat, 18 Aug 2018 11:37:05 +0200 |
Hi!
> Le 17 juil. 2013 à 21:08, Maxim Prohorenko <address@hidden> a écrit :
>
> URL:
> <http://savannah.gnu.org/support/?108339>
>
> Details:
>
> icc: .bison.cpp(2086): warning #161: unrecognized #pragma
>
> GCC paragmas unrecognized in icc:
>
> #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
> /* Suppress an incorrect diagnostic about yylval being uninitialized. */
> # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
> _Pragma ("GCC diagnostic push") \
> _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
> _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
> # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
> _Pragma ("GCC diagnostic pop")
> #else
> /* Default value used for initialization, for pacifying older GCCs
> or non-GCC compilers. */
> static YYSTYPE yyval_default;
> # define YY_INITIAL_VALUE(Value) = Value
> #endif
Thanks for the report! I’m installing the following patch. Please confirm
that it addresses your concern.
Cheers!
commit 921fec0422912159becf7360d3e12441be30c144
Author: Akim Demaille <address@hidden>
Date: Sat Aug 18 11:27:24 2018 +0200
portability: don't use _Pragma with ICC.
ICC defines __GNUC__ [1], but does not support GCC's _Pragma for
diagnostics. As a matter of fact, I believe it does not support
_Pragma at all (only #pragma) [2].
Reported by Maxim Prohorenko.
https://savannah.gnu.org/support/index.php?108339
[1]
https://software.intel.com/en-us/cpp-compiler-18.0-developer-guide-and-reference-gcc-compatibility-and-interoperability
[2]
https://software.intel.com/en-us/cpp-compiler-18.0-developer-guide-and-reference-pragmas
* data/c.m4 (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN): Exclude ICC from
the club.
diff --git a/NEWS b/NEWS
index d6888bce..63f40c69 100644
--- a/NEWS
+++ b/NEWS
@@ -99,6 +99,11 @@ GNU Bison NEWS
%printer/%destructor, which resulted in compiler errors if there are
backslashes or double-quotes in the grammar file name.
+*** Portability on ICC
+
+ The Intel compiler claims compatibility with GCC, yet rejects its _Pragma.
+ Generated parsers now work around this.
+
* Noteworthy changes in release 3.0.5 (2018-05-27) [stable]
** Bug fixes
diff --git a/THANKS b/THANKS
index 917fb300..ffea0f16 100644
--- a/THANKS
+++ b/THANKS
@@ -90,6 +90,7 @@ Martin Mokrejs address@hidden
Martin Nylin address@hidden
Matt Kraai address@hidden
Matt Rosing address@hidden
+Maxim Prohorenko address@hidden
Michael Catanzaro address@hidden
Michael Felt address@hidden
Michael Hayes address@hidden
diff --git a/data/c.m4 b/data/c.m4
index c28ffc61..346b8fd3 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -242,7 +242,7 @@ m4_define([b4_attribute_define],
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 +
__GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [sr #108339] ICC wargings in generated files,
Akim Demaille <=