aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2008-10-31 22:00:37 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2008-10-31 22:00:37 +0000
commit47960aaf168ced0414c68073897eb52f85a5264d (patch)
tree5b6ba852d83328ae9e0bff7601449464f2f69da2 /gcc
parent4f48b9c1a5fa185bf85768d4748de3077d503a53 (diff)
downloadgcc-47960aaf168ced0414c68073897eb52f85a5264d.zip
gcc-47960aaf168ced0414c68073897eb52f85a5264d.tar.gz
gcc-47960aaf168ced0414c68073897eb52f85a5264d.tar.bz2
expr.c (struct op): Add location.
2008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org> libcpp/ * expr.c (struct op): Add location. (_cpp_parse_expr): Propagate locations throught the stack of expressions. (reduce): Likewise. (check_promotion): Use explicit location in errors. testsuite/ * gcc.dg/cpp/Wsignprom.c: Add column numbers. * gcc.dg/cpp/if-mpar.c: Likewise. From-SVN: r141503
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/Wsignprom.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/if-mpar.c18
3 files changed, 25 insertions, 14 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 616e10b..9051361 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * gcc.dg/cpp/Wsignprom.c: Add column numbers.
+ * gcc.dg/cpp/if-mpar.c: Likewise.
+
2008-10-31 Jakub Jelinek <jakub@redhat.com>
PR c++/37967
diff --git a/gcc/testsuite/gcc.dg/cpp/Wsignprom.c b/gcc/testsuite/gcc.dg/cpp/Wsignprom.c
index 44b5667..7cdbccb 100644
--- a/gcc/testsuite/gcc.dg/cpp/Wsignprom.c
+++ b/gcc/testsuite/gcc.dg/cpp/Wsignprom.c
@@ -1,26 +1,26 @@
/* { dg-do preprocess } */
-/* { dg-options "-Wall" } */
+/* { dg-options "-Wall -fshow-column" } */
/* Test that -Wall emits the warnings about integer promotion changing
the sign of an operand. */
-#if -1 > 0U /* { dg-warning "changes sign when promoted" } */
+#if -1 > 0U /* { dg-warning "5:changes sign when promoted" } */
#endif
-#if 0U + -1 /* { dg-warning "changes sign when promoted" } */
+#if 0U + -1 /* { dg-warning "10:changes sign when promoted" } */
#endif
-#if 0U * -1 /* { dg-warning "changes sign when promoted" } */
+#if 0U * -1 /* { dg-warning "10:changes sign when promoted" } */
#endif
-#if 1U / -2 /* { dg-warning "changes sign when promoted" } */
+#if 1U / -2 /* { dg-warning "10:changes sign when promoted" } */
#endif
-#if -1 % 1U /* { dg-warning "changes sign when promoted" } */
+#if -1 % 1U /* { dg-warning "5:changes sign when promoted" } */
#endif
-#if 1 ? 0U : -1 /* { dg-warning "changes sign when promoted" } */
+#if 1 ? 0U : -1 /* { dg-warning "14:changes sign when promoted" } */
#endif
-#if 1 ? -1 : 0U /* { dg-warning "changes sign when promoted" } */
+#if 1 ? -1 : 0U /* { dg-warning "9:changes sign when promoted" } */
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/if-mpar.c b/gcc/testsuite/gcc.dg/cpp/if-mpar.c
index df200bb..633cefc 100644
--- a/gcc/testsuite/gcc.dg/cpp/if-mpar.c
+++ b/gcc/testsuite/gcc.dg/cpp/if-mpar.c
@@ -4,21 +4,27 @@
missing parenthesis message. */
/* { dg-do preprocess } */
+/* { dg-options "-fshow-column" } */
+#if (1 /* { dg-error "5:missing '\\)'" "missing ')' no. 1" } */
+#endif
+
+#if 2 * (3 + 4 /* { dg-error "9:missing '\\)'" "missing ')' no. 2" } */
+#endif
-#if (1 /* { dg-error "missing '\\)'" "missing ')' no. 1" } */
+#if (2)) /* { dg-error "8:missing '\\('" "missing '(' no. 1" } */
#endif
-#if 2 * (3 + 4 /* { dg-error "missing '\\)'" "missing ')' no. 2" } */
+#if ) /* { dg-error "5:missing '\\('" "missing '(' no. 2" } */
#endif
-#if (2)) /* { dg-error "missing '\\('" "missing '(' no. 1" } */
+#if 4) /* { dg-error "6:missing '\\('" "missing '(' no. 3" } */
#endif
-#if ) /* { dg-error "missing '\\('" "missing '(' no. 2" } */
+#if ( /* { dg-error "5:missing '\\)'" "missing ')' no. 3" } */
#endif
-#if 4) /* { dg-error "missing '\\('" "missing '(' no. 3" } */
+#if ((2 + 3) + 5 /* { dg-error "5:missing '\\)'" "missing ')' no. 3" } */
#endif
-#if ( /* { dg-error "missing '\\)'" "missing ')' no. 3" } */
+#if ((2 + 3 + 5 /* { dg-error "6:missing '\\)'" "missing ')' no. 3" } */
#endif