GCC 3.0 Status Report
Joe Buck
jbuck@racerx.synopsys.com
Thu Apr 19 17:43:00 GMT 2001
Mark writes:
> + // Build don't link:
> + // Origin: Mark Mitchell <mark@codesourcery.com>
> +
> + namespace N {
> + extern "C" int i;
> +
> + void f () {
> + i = 3;
> + }
> + };
> +
> + int i;
> +
> + int main () { N::f (); }
Perhaps I'm missing something, but if you say "Build don't link"
it seems that the test does not catch the error. If We get an .o
file that incorrectly references N::i, it's still a valid .o file.
The program must be linked to reveal the undefined symbol. Right?
More information about the Libstdc++
mailing list