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. -- Summary: [4.2/4.3 Regression] TYPE_RAISES_EXCEPTIONS dumped with attributes Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33506