]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
compiler: don't assume that ATTRIBUTE_UNUSED is defined
authorIan Lance Taylor <iant@golang.org>
Wed, 7 Aug 2024 20:24:22 +0000 (13:24 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 7 Aug 2024 20:31:25 +0000 (13:31 -0700)
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/604075

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/lex.h

index e13dc5f58a3d0e463faf87e798f766d2f42e96b7..3a839410e9cc11085de54a14dc8468589f91f24d 100644 (file)
@@ -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.
index 701e5d4b353ba310f847b9d4afb4f5f0a86638ac..452ef95f334ffcd560e1fe4e6d42033a0b86c603 100644 (file)
 #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.