===================================================================
@@ -521,15 +521,15 @@ c_lex_with_flags (tree *value, location_
case CPP_OTHER:
{
cppchar_t c = tok->val.str.text[0];
if (c == '"' || c == '\'')
- error ("missing terminating %c character", (int) c);
+ error_at (*loc, "missing terminating %c character", (int) c);
else if (ISGRAPH (c))
- error ("stray %qc in program", (int) c);
+ error_at (*loc, "stray %qc in program", (int) c);
else
- error ("stray %<\\%o%> in program", (int) c);
+ error_at (*loc, "stray %<\\%o%> in program", (int) c);
}
goto retry;
case CPP_CHAR_USERDEF:
case CPP_WCHAR_USERDEF:
===================================================================
@@ -7,8 +7,8 @@
const char *p = "line 1
"
""; /* The compiler front end sees this. */
-/* { dg-error "missing term" "multiline strings" { target *-*-* } 8 } */
+/* { dg-error "17:missing term" "multiline strings" { target *-*-* } 8 } */
/* { dg-error "missing term" "multiline strings" { target *-*-* } 9 } */
===================================================================
@@ -4,6 +4,6 @@
/* { dg-options -fno-dollars-in-identifiers } */
/* Test that -fno-dollars-in-identifiers is honoured.
Neil Booth, 17 May 2003. */
-int foobar$; /* { dg-error "stray '\\$'" } */
+int foobar$; /* { dg-error "11:stray '\\$'" } */
===================================================================
@@ -14,17 +14,17 @@
then 'note: #pragma message: ', allowing dg-message to check output.
If unexpected pragma messages are printed (anything not caught by a
matching dg-message), dejagnu will report these as excess errors. */
#pragma message "
-/* { dg-error "missing terminating" "" { target *-*-* } 18 } */
+/* { dg-error "17:missing terminating" "" { target *-*-* } 18 } */
/* { dg-warning "expected a string" "" { target *-*-* } 18 } */
#pragma message "Bad 1
-/* { dg-error "missing terminating" "" { target *-*-* } 21 } */
+/* { dg-error "17:missing terminating" "" { target *-*-* } 21 } */
/* { dg-warning "expected a string" "" { target *-*-* } 21 } */
#pragma message ("Bad 2
-/* { dg-error "missing terminating" "" { target *-*-* } 24 } */
+/* { dg-error "18:missing terminating" "" { target *-*-* } 24 } */
/* { dg-warning "expected a string" "" { target *-*-* } 24 } */
#pragma message ("Bad 3"
/* { dg-warning "malformed '#pragma message" "" { target *-*-* } 27 } */
#pragma message "" junk
===================================================================
@@ -8,22 +8,22 @@ main()
i = 0X'100000; // { dg-error "digit separator after base indicator" }
i = 0x'100000; // { dg-error "digit separator after base indicator" }
i = 0004''000'000; // { dg-error "adjacent digit separators" }
i = 0B1'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0; // OK
i = 0b'0001'0000'0000'0000'0000'0000; // { dg-error "digit separator after base indicator" }
- i = 0b0001'0000'0000'0000'0000'0000'; // { dg-error "missing terminating" }
+ i = 0b0001'0000'0000'0000'0000'0000'; // { dg-error "38:missing terminating" }
unsigned u = 0b0001'0000'0000'0000'0000'0000'U; // { dg-error "digit separator outside digit sequence" }
double d = 0.0;
d = 1'.602'176'565e-19; // { dg-error "digit separator adjacent to decimal point" }
d = 1.'602'176'565e-19; // { dg-error "digit separator adjacent to decimal point" }
d = 1.602''176'565e-19; // { dg-error "adjacent digit separators" }
d = 1.602'176'565'e-19; // { dg-error "digit separator adjacent to exponent" }
- d = 1.602'176'565e'-19; // { dg-error "missing terminating" }
+ d = 1.602'176'565e'-19; // { dg-error "21:missing terminating" }
d = 1.602'176'565e-'19; // { dg-error "digit separator adjacent to exponent" }
d = 1.602'176'565e-1'9; // OK
- d = 1.602'176'565e-19'; // { dg-error "missing terminating" }
+ d = 1.602'176'565e-19'; // { dg-error "24:missing terminating" }
float f = 1.602'176'565e-19'F; // { dg-error "digit separator outside digit sequence" }
}
// { dg-error "exponent has no digits" "exponent has no digits" { target *-*-* } 21 }
// { dg-error "expected ';' before" "expected ';' before" { target *-*-* } 14 }
===================================================================
@@ -10,11 +10,11 @@ def()abcdef";
const void *s1 = R"??/
()??/";
// { dg-error "invalid new-line" "invalid" { target *-*-* } 10 }
// { dg-error "stray" "stray" { target *-*-* } 10 }
// { dg-warning "missing terminating" "missing" { target *-*-* } 10 }
- // { dg-error "missing terminating" "missing" { target *-*-* } 10 }
+ // { dg-error "19:missing terminating" "missing" { target *-*-* } 10 }
const void *s2 = R"abcdefghijklmn??/(a)abcdefghijklmn???";
// { dg-error "raw string delimiter longer" "longer" { target *-*-* } 16 }
// { dg-error "stray" "stray" { target *-*-* } 16 }
// { dg-error "expected" "expected" { target *-*-* } 16 }
const void *s3 = R"abcdefghijklmno??/(a)abcdefghijklmno???";