aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-07-12 13:23:53 +0200
committerMartin Liska <mliska@suse.cz>2022-07-12 13:23:53 +0200
commitb9dc4e9c94877b52037f2bd4eb01b5d179e41a43 (patch)
tree11152b01244ee927fbf5460e08a200e03be0fdf5 /gcc/c
parentc9de7a601878148247a44c4b04f550daa27cd556 (diff)
parent220bef460153a0296e947f16492d35e67b1b5b22 (diff)
downloadgcc-b9dc4e9c94877b52037f2bd4eb01b5d179e41a43.zip
gcc-b9dc4e9c94877b52037f2bd4eb01b5d179e41a43.tar.gz
gcc-b9dc4e9c94877b52037f2bd4eb01b5d179e41a43.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-parser.cc1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 989f293..3aa672b 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
+
+ PR preprocessor/97498
+ * c-parser.cc (c_parser_pragma): Set input_location to the
+ location of the pragma, rather than the start of the line.
+
2022-07-04 Tobias Burnus <tobias@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index 9c02141..92049d1 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -12397,6 +12397,7 @@ c_parser_pragma (c_parser *parser, enum pragma_context context, bool *if_p)
unsigned int id;
const char *construct = NULL;
+ input_location = c_parser_peek_token (parser)->location;
id = c_parser_peek_token (parser)->pragma_kind;
gcc_assert (id != PRAGMA_NONE);