[Bug c++/33925] gcc -Waddress lost some useful warnings

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jan 31 02:46:00 GMT 2008



------- Comment #1 from manu at gcc dot gnu dot org  2008-01-31 01:32 -------
I am not sure if this is actually a bug, since I think functions with weak
linkage can actually have a null-address if they are not instantiated.
Nonetheless, a regression hunt identifies this patch as the cause:

r104103 | mmitchel | 2005-09-09 20:56:16 +0200 (Fri, 09 Sep 2005) | 15 lines

        PR c++/22252
        * decl.c (start_preparsed_function): Do not pay attention to
        #pragma interface for implicitly-defined methods.
        * decl2.c (cp_finish_file): Do not complain about uses of inline
        functions that have bodies, even if we decided not to emit the
        body in this translation unit.
        * semantics.c (note_decl_for_pch): Do not mess with linkage.
        (expand_or_defer_fn): Make inline, non-template functions COMDAT
        at this point.

        PR c++/22252
        * g++.dg/ext/interface1.C: New test.
        * g++.dg/ext/interface1.h: Likewise.
        * g++.dg/ext/interface1a.cc: Likewise.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33925



More information about the Gcc-bugs mailing list