extern int foo (char *) __attribute__ ((warn_unused_result)); extern int bar (char *) throw () __attribute__ ((warn_unused_result)); extern int bar (char *) throw (); fails to compile with 4.2/4.3 (instead of warn_unused_result any other attribute that has type_required set can be used, like nonnull, regparm, ...). The problem is that attribs will modify the type using build_type_attribute_variant, which, being a middle-end rather than FE function, doesn't know about TYPE_RAISES_EXCEPTIONS.
Subject: Bug 33506 Author: jakub Date: Mon Sep 24 15:16:23 2007 New Revision: 128718 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128718 Log: PR c++/33506 * langhooks.h (struct lang_hooks_for_types): Add type_hash_eq field. * langhooks-def.h (LANG_HOOKS_TYPE_HASH_EQ): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_TYPE_HASH_EQ. * tree.c (type_hash_eq): For FUNCTION_TYPE use lang_hooks.type.type_hash_eq in addition to generic tests. * cp-tree.h (cxx_type_hash_eq): New prototype. * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine. * tree.c (cxx_type_hash_eq): New function. * g++.dg/ext/attrib29.C: New test. Added: trunk/gcc/testsuite/g++.dg/ext/attrib29.C Modified: trunk/gcc/ChangeLog trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-objcp-common.h trunk/gcc/cp/cp-tree.h trunk/gcc/cp/tree.c trunk/gcc/langhooks-def.h trunk/gcc/langhooks.h trunk/gcc/testsuite/ChangeLog trunk/gcc/tree.c
Fixed on the trunk.
Change target milestone to 4.2.3, as 4.2.2 has been released.
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.
4.2.4 is being released, changing milestones to 4.2.5.
Closing 4.2 branch, fixed in 4.3.