Comments (3)
It looks like this is also a problem in gcc/toplev.h
since the macro is redefined there, too.
from gcc4ti.
And gcc/c-tree.h
.
After some trial and error I got things to build with the following patch, applied after (or part of, I guess) Install_step_1.
--- a/gcc/pretty-print.h
+++ b/gcc/pretty-print.h
@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const char *, const char *);
/* This header may be included before diagnostics-core.h, hence the duplicate
definitions to allow for GCC-specific formats. */
-#if GCC_VERSION >= 3005
+#if (GCC_VERSION >= 3005) && (GCC_VERSION < 9001) /* 9.1.0 and 9.2.0 are buggy: https://gcc.gnu.org/PR90677 */
#define ATTRIBUTE_GCC_PPDIAG(m, n) __attribute__ ((__format__ (__gcc_diag__, m ,n))) ATTRIBUTE_NONNULL(m)
#else
#define ATTRIBUTE_GCC_PPDIAG(m, n) ATTRIBUTE_NONNULL(m)
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -49,7 +49,7 @@ extern void _fatal_insn (const char *, r
/* None of these functions are suitable for ATTRIBUTE_PRINTF, because
each language front end can extend them with its own set of format
specifiers. We must use custom format checks. */
-#if GCC_VERSION >= 4001
+#if GCC_VERSION >= 4001 && (GCC_VERSION < 9001)
#define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
#else
#define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -613,7 +613,7 @@ extern void c_write_global_declarations
/* In order for the format checking to accept the C frontend
diagnostic framework extensions, you must include this file before
toplev.h, not after. */
-#if GCC_VERSION >= 4001
+#if GCC_VERSION >= 4001 && (GCC_VERSION < 9001)
#define ATTRIBUTE_GCC_CDIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m ,n))) ATTRIBUTE_NONNULL(m)
#else
#define ATTRIBUTE_GCC_CDIAG(m, n) ATTRIBUTE_NONNULL(m)
from gcc4ti.
Given that GCC 9.3 and 10 contain fixes for the GCC bugs, (GCC_VERSION < 9001)
should read something long the lines of ((GCC_VERSION < 9001) || (GCC_VERSION >= 9003))
. However, given that fixed 9.x versions are available, people shouldn't be using the buggy versions anyway... so let's just do nothing ? :)
from gcc4ti.
Related Issues (13)
- Can't include local header files HOT 2
- Add back Virtual TI support as an option. HOT 7
- Error executing m68k-coff-tigcc-gcc HOT 9
- GrayGetSwitchCount does not work on HW3 HOT 4
- Missing header "gtype-desc.h" HOT 9
- Documentation updating support for GNU/Linux systems HOT 2
- Incompatible TIGCCLIB change (default.h inclusion removal)
- Incompatible macro removal (GetAMSSize)
- Please rename your forks of TIGCCLIB and ld-tigcc HOT 24
- Error on running updatesrc
- Incorrect FSF address
- Incompatibility with Windows 10 Taskbar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcc4ti.