From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31256 invoked by alias); 24 Apr 2002 19:03:48 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30462 invoked from network); 24 Apr 2002 19:01:12 -0000 Received: from unknown (HELO linuxpc1.lauterbach.com) (213.70.137.66) by sources.redhat.com with SMTP; 24 Apr 2002 19:01:12 -0000 Received: (qmail 28879 invoked by uid 82); 24 Apr 2002 19:01:10 -0000 Received: from Franz.Sirl-kernel@lauterbach.com by linuxpc1.lauterbach.com with qmail-scanner-1.01 (inocmd32: /. . Clean. Processed in 41.157489 secs); 24 Apr 2002 19:01:10 -0000 Received: from dsl-213-023-060-201.arcor-ip.net (HELO enzo) (213.23.60.201) by linuxpc1.lauterbach.com with SMTP; 24 Apr 2002 19:01:09 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Franz Sirl To: Jason Merrill Subject: Re: GCC 3.1 Prerelease Date: Wed, 24 Apr 2002 12:04:00 -0000 Cc: Richard Henderson , Alan Modra , Mark Mitchell , gcc@gcc.gnu.org References: <5.1.1.2.2.20020423130143.04a21008@mail.lauterbach.com> <200204240003.42142@enzo.bigblue.local> In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200204242101.39393@enzo.bigblue.local> X-SW-Source: 2002-04/txt/msg01258.txt.bz2 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 >::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 >::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.