aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-03-14 18:01:10 +0000
committerTom Tromey <tromey@gcc.gnu.org>2011-03-14 18:01:10 +0000
commit87f9e23dafd42a3ad8df6feb6cc413e3aa6f110b (patch)
treef289bb5ce64b337811d0290881f63709853bfe93 /gcc/c-parser.c
parentb3ab9ea2979fd0fcc2a3eff1f0c417c5e6f27f35 (diff)
downloadgcc-87f9e23dafd42a3ad8df6feb6cc413e3aa6f110b.zip
gcc-87f9e23dafd42a3ad8df6feb6cc413e3aa6f110b.tar.gz
gcc-87f9e23dafd42a3ad8df6feb6cc413e3aa6f110b.tar.bz2
c-parser.c (c_parser_asm_string_literal): Clear warn_overlength_strings.
gcc * c-parser.c (c_parser_asm_string_literal): Clear warn_overlength_strings. gcc/testsuite * gcc.dg/Woverlength-strings-pedantic-c90-asm.c: New file. * gcc.dg/Woverlength-strings-pedantic-c89-asm.c: New file. * gcc.dg/Woverlength-strings-pedantic-c99-asm.c: New file. From-SVN: r170948
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 7b18827..33e7362 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -3264,6 +3264,8 @@ static tree
c_parser_asm_string_literal (c_parser *parser)
{
tree str;
+ int save_flag = warn_overlength_strings;
+ warn_overlength_strings = 0;
if (c_parser_next_token_is (parser, CPP_STRING))
{
str = c_parser_peek_token (parser)->value;
@@ -3281,6 +3283,7 @@ c_parser_asm_string_literal (c_parser *parser)
c_parser_error (parser, "expected string literal");
str = NULL_TREE;
}
+ warn_overlength_strings = save_flag;
return str;
}