aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2024-08-07 13:24:22 -0700
committerIan Lance Taylor <iant@golang.org>2024-08-07 13:31:25 -0700
commitac8a87c4e345c71c32984625ce4a5a74a710b501 (patch)
tree2bcd0b08b517158a5324f8f41eb6ecb48e74c5d5 /gcc/go
parent4cec7bc79db52bae159c3c60a415e2aea48051d8 (diff)
downloadgcc-ac8a87c4e345c71c32984625ce4a5a74a710b501.zip
gcc-ac8a87c4e345c71c32984625ce4a5a74a710b501.tar.gz
gcc-ac8a87c4e345c71c32984625ce4a5a74a710b501.tar.bz2
compiler: don't assume that ATTRIBUTE_UNUSED is defined
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/604075
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/lex.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index e13dc5f..3a83941 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-5f6fae5ff33e996243acd098c71904695c414c53
+6aa463fef2d8f04e0bd2675f63a6529df080a44a
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/lex.h b/gcc/go/gofrontend/lex.h
index 701e5d4..452ef95 100644
--- a/gcc/go/gofrontend/lex.h
+++ b/gcc/go/gofrontend/lex.h
@@ -12,6 +12,12 @@
#include "operator.h"
#include "go-linemap.h"
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# define GO_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#else
+# define GO_ATTRIBUTE_UNUSED
+#endif
+
struct Unicode_range;
// The keywords. These must be in sorted order, other than
@@ -561,7 +567,7 @@ class Lex
gather_embed(const char*, const char*);
// The input file name.
- const char* input_file_name_ ATTRIBUTE_UNUSED;
+ const char* input_file_name_ GO_ATTRIBUTE_UNUSED;
// The input file.
FILE* input_file_;
// The object used to keep track of file names and line numbers.