This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH PR c++/13989 and PR c++/9844


Fariborz Jahanian wrote:






ChangeLog:


This patch addresses PRs 13989 and 9844 and more.
Patch adds support to allow specification of attributes in c++'s function
return type. This includes, member functions, friend functions and type
conversion functions. This patch has been bootstrapped and dejagnu
tested on apple-ppc-darwin. Several tests is included which shows the
extend of support that this patch provides.


OK for mainline?


- Thanks, fariborz

2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
        PR c++/13989
        PR c++/9844

* tree.c (reconstruct_complex_type): Remove extra "this".
* cp/cp-tree.h (check_classfn): Add new argument to declaration.
* cp/pt.c (tsubst_friend_function): Add extra argument to call
to check_classfn.
* cp/cvt.c (ocp_convert): Add support to use type conversion
function to vector type.
* cp/decl.c (grokfndecl): Add new argument "attrlist".
* cp/decl2.c (check_classfn): Added new argument "attrlist"and
use the new "attrlist" parameter to build the vector type.
* cp/friend.c (do_friend): Pass attrlist to check_classfn call.
* cp/parser.c (cp_parser_conversion_type_id): Add attributes, if any,
to the parsed type.
* config/rs6000/rs6000.c (rs6000_handle_altivec_attribute):
Add V4SFmode to case statement.

I think that you should do the attribute processing in grokfndecl, not in check_classfn. There's nothing special about member functions from this point of view; we should be processing attributes for non-member functions and member functions in the same way. Where do non-member functions get their attributes attached? Is that too late for member functions? If so, we should maybe move the processing earlier.


Thanks,

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]