This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 3.1 Prerelease


On Wednesday 24 April 2002 19:31, Jason Merrill wrote:
> While I was looking at this bug earlier (before I saw that you were working
> on it), I made this change.  Checking TREE_SYMBOL_REFERENCED makes more
> sense than TREE_USED anyway, since it's the symbol we care about.

Hmm, it seems to make more sense for the warning check too, with TREE_USED 
changed to TREE_SYMBOL_REFERENCED the c++ regression 
g++.old-deja/g++.jason/template39.C went away along with a bunch of 
regressions in the libstdc++ testsuite, except one:

FAIL: 26_numerics/complex_inserters_extractors.cc (test for excess errors)
Excess errors:
/home/fsirl/TC/gcc/BUILD/obj-gcc31-ppc/ppc-linux/libstdc++-v3/include/bits/basic_string.h: 
In instantiation of `const size_t std::basic_string<char, gnu_cha
r_traits, std::allocator<char> >::npos':
/home/fsirl/TC/gcc/BUILD/gcc-3.1/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc:109:   
instantiated from here
/home/fsirl/TC/gcc/BUILD/obj-gcc31-ppc/ppc-linux/libstdc++-v3/include/bits/basic_string.h:217: 
warning: weak declaration of `const size_t std::basic_string<
char, gnu_char_traits, std::allocator<char> >::npos' after first use may 
result in unspecified behaviour

Can a c++ expert tell me if this warning makes sense in this testcase or does 
the warning check need still more refinement?

Hmm, Jason, I'm just noticing the purpose of the test in weak_finish. This 
seems to be a behaviour change compared to earlier gcc releases. A simple 
file like that:

#pragma weak foo1
extern int foo2 __attribute__((weak));

will now result in this assembly file:

        .file   "weak-pragma.c"
        .ident  "GCC: (GNU) 3.1 20020423 (prerelease)"

But upto 3.0.x we got:

        .file   "weak-pragma.c"
        .weak   foo2
        .weak   foo1
        .ident  "GCC: (GNU) 3.0.3 20011213 (prerelease)"

Are we sure there is no code out there relying on these lonely .weak 
statements? Was this change intended?

Franz.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]