Commit 5e11b87c by Alexandre Oliva Committed by Alexandre Oliva

extern1.C: New test.

	* g++.old-deja/g++.ns/extern1.C: New test.  Extern declarations
 	within functions should introduce names into the innermost
 	enclosing namespace

From-SVN: r22902
parent b01c911d
1998-10-08 Alexandre Oliva <oliva@dcc.unicamp.br>
* g++.old-deja/g++.other/init7.C: New test: retry initialization
* g++.old-deja/g++.ns/extern1.C: New test. Extern declarations
within functions should introduce names into the innermost
enclosing namespace
* g++.old-deja/g++.other/init7.C: New test. Retry initialization
of static locals if first initialization throws
Wed Oct 7 12:00:20 1998 Jim Wilson <wilson@cygnus.com>
......
// Build don't run:
// Based on a testcase by eyal.ben-david@aks.com
// An extern declaration of an undeclared object within a function
// introduces the object into the enclosing namespace [basic.link]/7
namespace {
void foo() {
extern int xx; // causes linker error - XFAIL *-*-*
xx = 0;
}
int xx = 1;
}
int main() {
xx = 2;
}
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