aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-04-19 10:07:35 +0200
committerRichard Biener <rguenther@suse.de>2021-04-19 14:43:39 +0200
commit2f422b550ff6351d312e6c81a00b488d9280bfff (patch)
tree542ef140376fcc25f42211d6a7afc8d24fd247ab /gcc
parent3395dfc4da8ad1fccd346c62dfc9bd44b2b48c62 (diff)
downloadgcc-2f422b550ff6351d312e6c81a00b488d9280bfff.zip
gcc-2f422b550ff6351d312e6c81a00b488d9280bfff.tar.gz
gcc-2f422b550ff6351d312e6c81a00b488d9280bfff.tar.bz2
preprocessor/100142 - revert unwanted change in last commit
This reverts a s/column_offset/column/ change in the fix for PR99446. 2021-04-19 Richard Biener <rguenther@suse.de> PR preprocessor/100142 libcpp/ * line-map.c (linemap_position_for_loc_and_offset): Revert unintended s/column_offset/column/ change. gcc/testsuite/ * gcc.dg/pr100142.c: New testcase. * g++.dg/diagnostic/pr72803.C: Revert last change.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/pr72803.C5
-rw-r--r--gcc/testsuite/gcc.dg/pr100142.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr72803.C b/gcc/testsuite/g++.dg/diagnostic/pr72803.C
index ca522b7..0a9a390 100644
--- a/gcc/testsuite/g++.dg/diagnostic/pr72803.C
+++ b/gcc/testsuite/g++.dg/diagnostic/pr72803.C
@@ -5,6 +5,5 @@ class test {
// The line directive appears to be necessary to trigger the ICE
// { dg-error "style of line directive is a GCC extension" "" { target *-*-* } .-2 }
-/* Verify that we get the best line and column for the diagnostic.
- 512 is not representable in the line-maps created for this test. */
-// { dg-error "511: expected .;. after class definition" "" { target *-*-* } 3 }
+/* Verify that we get the correct line and column for the diagnostic. */
+// { dg-error "512: expected .;. after class definition" "" { target *-*-* } 3 }
diff --git a/gcc/testsuite/gcc.dg/pr100142.c b/gcc/testsuite/gcc.dg/pr100142.c
new file mode 100644
index 0000000..aec146c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr100142.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-fpreprocessed" } */
+
+void
+foo (void)
+{
+ assert (1); /* { dg-warning "implicit" } */
+}