-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b15
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045447 | 8u25 | David Chase | P4 | Resolved | Fixed | b01 |
JDK-8043809 | 8u20 | David Chase | P4 | Resolved | Fixed | b16 |
JDK-8053362 | emb-8u26 | David Chase | P4 | Resolved | Fixed | b17 |
JDK-8199964 | openjdk7u | Andrew Hughes | P4 | Resolved | Fixed | master |
Change 8037816 introduced extra format checking by GCC for custom HS printf functions by annotating them with __attribute__((format(printf,...)). These checks have been selectively disabled with the help of diagnostic pragmas (i.e. #pragma GCC diagnostic ignored "-Wformat-nonliteral") in places where these functions are called with non-constant format strings.
Unfortunately, diagnostic pragmas were only introduced in GCC 4.2 (see http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas). Older GCC versions simply ignore these pragmas and issue a warning.
The fix to this problem is trivial - only enable '__attribute__((format(printf,...))'-annotations for GCC 4.2 and above.
Unfortunately, diagnostic pragmas were only introduced in GCC 4.2 (see http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas). Older GCC versions simply ignore these pragmas and issue a warning.
The fix to this problem is trivial - only enable '__attribute__((format(printf,...))'-annotations for GCC 4.2 and above.
- backported by
-
JDK-8043809 Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
- Resolved
-
JDK-8045447 Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
- Resolved
-
JDK-8053362 Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
- Resolved
-
JDK-8199964 Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
- Resolved