First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 33506
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Jakub Jelinek <jakub@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Jakub Jelinek <jakub@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
Patch URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 33506 depends on: Show dependency tree
Show dependency graph
Bug 33506 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2007-09-20 00:08 Opened: 2007-09-19 23:17
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.

------- Comment #1 From Jakub Jelinek 2007-09-24 15:16 -------
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

------- Comment #2 From Jakub Jelinek 2007-09-27 09:20 -------
Fixed on the trunk.

------- Comment #3 From Mark Mitchell 2007-10-09 19:20 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.

------- Comment #4 From Joseph S. Myers 2008-02-01 16:54 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.

------- Comment #5 From Joseph S. Myers 2008-05-19 20:23 -------
4.2.4 is being released, changing milestones to 4.2.5.

------- Comment #6 From Joseph S. Myers 2009-03-30 22:25 -------
Closing 4.2 branch, fixed in 4.3.

First Last Prev Next    No search results available      Search page      Enter new bug