aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-07-13 14:13:29 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-07-13 12:13:29 +0000
commit6d28654eed653652112dd62241fbcc0fd6090707 (patch)
treed6f6c0838ec98a14a3ad91631514a657f7e97485 /gcc
parent7123f4476ef349eed4a9d16ec18ca2623803045f (diff)
downloadgcc-6d28654eed653652112dd62241fbcc0fd6090707.zip
gcc-6d28654eed653652112dd62241fbcc0fd6090707.tar.gz
gcc-6d28654eed653652112dd62241fbcc0fd6090707.tar.bz2
Add quotes to error messages related to Sanitizers.
2017-07-13 Martin Liska <mliska@suse.cz> * opts.c (finish_options): Add quotes to error messages. (parse_sanitizer_options): Likewise. 2017-07-13 Martin Liska <mliska@suse.cz> * c-c++-common/ubsan/sanitize-all-1.c: Update scanned pattern. * c-c++-common/ubsan/sanitize-recover-1.c:Likewise. * c-c++-common/ubsan/sanitize-recover-2.c:Likewise. * c-c++-common/ubsan/sanitize-recover-5.c:Likewise. * c-c++-common/ubsan/sanitize-recover-7.c:Likewise. * c-c++-common/ubsan/sanitize-recover-8.c:Likewise. * c-c++-common/ubsan/sanitize-recover-9.c:Likewise. From-SVN: r250179
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/opts.c18
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-all-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-recover-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-recover-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-recover-5.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-recover-7.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-recover-8.c2
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/sanitize-recover-9.c2
10 files changed, 31 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 25796f8..a148ee0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-13 Martin Liska <mliska@suse.cz>
+
+ * opts.c (finish_options): Add quotes to error messages.
+ (parse_sanitizer_options): Likewise.
+
2017-07-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
* doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
diff --git a/gcc/opts.c b/gcc/opts.c
index 7555ed5..e2e684f 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -954,26 +954,26 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS)
&& (opts->x_flag_sanitize & SANITIZE_KERNEL_ADDRESS))
error_at (loc,
- "-fsanitize=address is incompatible with "
- "-fsanitize=kernel-address");
+ "%<-fsanitize=address%> is incompatible with "
+ "%<-fsanitize=kernel-address%>");
/* And with TSan. */
if ((opts->x_flag_sanitize & SANITIZE_ADDRESS)
&& (opts->x_flag_sanitize & SANITIZE_THREAD))
error_at (loc,
- "-fsanitize=address and -fsanitize=kernel-address "
- "are incompatible with -fsanitize=thread");
+ "%<-fsanitize=address%> and %<-fsanitize=kernel-address%> "
+ "are incompatible with %<-fsanitize=thread%>");
if ((opts->x_flag_sanitize & SANITIZE_LEAK)
&& (opts->x_flag_sanitize & SANITIZE_THREAD))
error_at (loc,
- "-fsanitize=leak is incompatible with -fsanitize=thread");
+ "%<-fsanitize=leak%> is incompatible with %<-fsanitize=thread%>");
/* Check error recovery for -fsanitize-recover option. */
for (int i = 0; sanitizer_opts[i].name != NULL; ++i)
if ((opts->x_flag_sanitize_recover & sanitizer_opts[i].flag)
&& !sanitizer_opts[i].can_recover)
- error_at (loc, "-fsanitize-recover=%s is not supported",
+ error_at (loc, "%<-fsanitize-recover=%s%> is not supported",
sanitizer_opts[i].name);
/* When instrumenting the pointers, we don't want to remove
@@ -999,8 +999,8 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
if (opts->x_flag_stack_reuse != SR_NONE
&& opts_set->x_flag_stack_reuse != SR_NONE)
error_at (loc,
- "-fsanitize-address-use-after-scope requires "
- "-fstack-reuse=none option");
+ "%<-fsanitize-address-use-after-scope%> requires "
+ "%<-fstack-reuse=none%> option");
opts->x_flag_stack_reuse = SR_NONE;
}
@@ -1613,7 +1613,7 @@ parse_sanitizer_options (const char *p, location_t loc, int scode,
if (code == OPT_fsanitize_)
{
if (complain)
- error_at (loc, "-fsanitize=all option is not valid");
+ error_at (loc, "%<-fsanitize=all%> option is not valid");
}
else
flags |= ~(SANITIZE_THREAD | SANITIZE_LEAK
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b3b4f75..b5ca7fa 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2017-07-13 Martin Liska <mliska@suse.cz>
+
+ * c-c++-common/ubsan/sanitize-all-1.c: Update scanned pattern.
+ * c-c++-common/ubsan/sanitize-recover-1.c:Likewise.
+ * c-c++-common/ubsan/sanitize-recover-2.c:Likewise.
+ * c-c++-common/ubsan/sanitize-recover-5.c:Likewise.
+ * c-c++-common/ubsan/sanitize-recover-7.c:Likewise.
+ * c-c++-common/ubsan/sanitize-recover-8.c:Likewise.
+ * c-c++-common/ubsan/sanitize-recover-9.c:Likewise.
+
2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81193
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-all-1.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-all-1.c
index 9ffba50..96a8cc5 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-all-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-all-1.c
@@ -5,4 +5,4 @@
int i;
-/* { dg-error "-fsanitize=all option is not valid" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize=all. option is not valid" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-1.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-1.c
index 4d8c27e..efa5ad7 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-1.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-1.c
@@ -3,4 +3,4 @@
int i;
-/* { dg-error "-fsanitize-recover=unreachable is not supported" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize-recover=unreachable. is not supported" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-2.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-2.c
index e9849bd..2b7cbcb 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-2.c
@@ -3,4 +3,4 @@
int i;
-/* { dg-error "-fsanitize-recover=return is not supported" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize-recover=return. is not supported" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-5.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-5.c
index 9c1ed32..3d2e51e 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-5.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-5.c
@@ -3,4 +3,4 @@
int i;
-/* { dg-error "-fsanitize-recover=unreachable is not supported" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize-recover=unreachable. is not supported" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-7.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-7.c
index 26403ce..a571f2b 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-7.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-7.c
@@ -3,4 +3,4 @@
int i;
-/* { dg-error "-fsanitize=address and -fsanitize=kernel-address are incompatible with -fsanitize=thread" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize=address. and .-fsanitize=kernel-address. are incompatible with .-fsanitize=thread." "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-8.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-8.c
index ecaf0e6..97f4bf4 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-8.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-8.c
@@ -3,4 +3,4 @@
int i;
-/* { dg-error "-fsanitize=leak is incompatible with -fsanitize=thread" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize=leak. is incompatible with .-fsanitize=thread." "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-9.c b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-9.c
index ef80ef1..0800ecb 100644
--- a/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-9.c
+++ b/gcc/testsuite/c-c++-common/ubsan/sanitize-recover-9.c
@@ -3,4 +3,4 @@
int i;
-/* { dg-error "-fsanitize-recover=unreachable is not supported" "" { target *-*-* } 0 } */
+/* { dg-error ".-fsanitize-recover=unreachable. is not supported" "" { target *-*-* } 0 } */