summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-14 18:01:10 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-14 18:01:10 +0000
commit88c86c270741ef9692d2428532d746346ada7811 (patch)
treef289bb5ce64b337811d0290881f63709853bfe93 /gcc/c-parser.c
parent4e9eacabedc9d8f0c6faedd0355f151bc646921f (diff)
downloadgcc-88c86c270741ef9692d2428532d746346ada7811.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170948 138bc75d-0d04-0410-961f-82ee72b054a4
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 7b18827cfc6..33e7362baa0 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;
}