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
This commit is contained in:
parent
7123f4476e
commit
6d28654eed
10 changed files with 31 additions and 16 deletions
|
@ -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.
|
||||
|
|
18
gcc/opts.c
18
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 } */
|
||||
|
|
|
@ -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 } */
|
||||
|
|
|
@ -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 } */
|
||||
|
|
|
@ -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 } */
|
||||
|
|
|
@ -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 } */
|
||||
|
|
|
@ -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 } */
|
||||
|
|
|
@ -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 } */
|
||||
|
|
Loading…
Add table
Reference in a new issue