Commit 77a705e4 by Eric Christopher Committed by Eric Christopher

extern.c: New test.

2004-04-20  Eric Christopher  <echristo@redhat.com>

	* gcc.dg/charset/extern.c: New test.
	* g++.dg/charset/extern3.cc: Ditto.

2004-04-20  Eric Christopher  <echristo@redhat.com>

	* cp/parser.c (cp_parser_declaration): Move translate
	up before tokens are lexed.

From-SVN: r80926
parent bf9f06ae
2004-04-20 Eric Christopher <echristo@redhat.com>
* cp/parser.c (cp_parser_declaration): Move translate
up before tokens are lexed.
2004-04-20 Uros Bizjak <uros@kss-loka.si> 2004-04-20 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_asin and OTI_acos. * optabs.h (enum optab_index): Add new OTI_asin and OTI_acos.
......
...@@ -6349,6 +6349,8 @@ cp_parser_declaration (cp_parser* parser) ...@@ -6349,6 +6349,8 @@ cp_parser_declaration (cp_parser* parser)
if (token1.type != CPP_EOF) if (token1.type != CPP_EOF)
token2 = *cp_lexer_peek_nth_token (parser->lexer, 2); token2 = *cp_lexer_peek_nth_token (parser->lexer, 2);
c_lex_string_translate = true;
/* If the next token is `extern' and the following token is a string /* If the next token is `extern' and the following token is a string
literal, then we have a linkage specification. */ literal, then we have a linkage specification. */
if (token1.keyword == RID_EXTERN if (token1.keyword == RID_EXTERN
...@@ -6398,8 +6400,6 @@ cp_parser_declaration (cp_parser* parser) ...@@ -6398,8 +6400,6 @@ cp_parser_declaration (cp_parser* parser)
else else
/* Try to parse a block-declaration, or a function-definition. */ /* Try to parse a block-declaration, or a function-definition. */
cp_parser_block_declaration (parser, /*statement_p=*/false); cp_parser_block_declaration (parser, /*statement_p=*/false);
c_lex_string_translate = true;
} }
/* Parse a block-declaration. /* Parse a block-declaration.
......
2004-04-20 Eric Christopher <echristo@redhat.com>
* gcc.dg/charset/extern.c: New test.
* g++.dg/charset/extern3.cc: Ditto.
2004-04-20 Uros Bizjak <uros@kss-loka.si> 2004-04-20 Uros Bizjak <uros@kss-loka.si>
* gcc.dg/builtins-39.c: New test. * gcc.dg/builtins-39.c: New test.
......
/* { dg-do compile }
{ dg-require-iconv "IBM-1047" }
{ dg-final { scan-assembler-not "abcdefghijklmnopqrstuvwxyz" } } */
extern char *bar;
extern void foo (void)
{
char str[]="abcdefghijklmnopqrstuvwxyz";
bar = str;
}
/* { dg-do compile }
{ dg-require-iconv "IBM-1047" }
{ dg-final { scan-assembler-not "abcdefghijklmnopqrstuvwxyz" } } */
extern char *bar;
extern void foo (void)
{
char str[]="abcdefghijklmnopqrstuvwxyz";
bar = str;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment