public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jason at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/35758] [4.3/4.4 Regression] vector_size attribute lost in function arguments for templates Date: Fri, 04 Apr 2008 18:11:00 -0000 [thread overview] Message-ID: <20080404181031.16390.qmail@sourceware.org> (raw) In-Reply-To: <bug-35758-6528@http.gcc.gnu.org/bugzilla/> ------- Comment #12 from jason at redhat dot com 2008-04-04 18:10 ------- Subject: Re: [4.3/4.4 Regression] vector_size attribute lost in function arguments for templates jakub at gcc dot gnu dot org wrote: > Actually, to clarify #c10, attributes on parameter packs just make things > harder on the compiler side, but even in C++98 the same issue is present: > #define vector __attribute__((__vector_size__ (16))) > > template <typename T> void foo (int x, vector T y) { } > void bar (vector long a, vector double b) > { > foo<long> (5, a); > foo (5, b); > } This functionality seems desirable, but cannot be considered a regression. > Are there any attributes other than vector_size which affect the decls > similarly? I don't think so. > If not, I'd say that the C++ FE should hardcode some knowledge about this > attribute, e.g. know that it applies to the type, so if > processing_template_decl > move them from DECL_ATTRIBUTES to corresponding type's TYPE_ATTRIBUTES (either > the parameter type such that it would be in TYPE_ARG_TYPES too, or for > FUNCTION_TYPE/METHOD_TYPE stick it into return type's TYPE_ATTRIBUTES). > And in type_unification_real take it into account. This makes sense to me. Though I think that if we just push the attribute down to the type that it actually modifies, we don't have to think about TYPE_ARG_TYPES. That should also avoid the need for reconstruct_complex_type. Jason -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35758
next prev parent reply other threads:[~2008-04-04 18:11 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-03-29 18:45 [Bug c++/35758] New: " pinskia at gcc dot gnu dot org 2008-03-29 18:46 ` [Bug c++/35758] " pinskia at gcc dot gnu dot org 2008-03-29 18:47 ` pinskia at gcc dot gnu dot org 2008-03-29 18:48 ` pinskia at gcc dot gnu dot org 2008-03-29 18:50 ` pinskia at gcc dot gnu dot org 2008-03-29 18:56 ` rguenth at gcc dot gnu dot org 2008-03-31 0:17 ` pinskia at gcc dot gnu dot org 2008-03-31 0:19 ` pinskia at gcc dot gnu dot org 2008-03-31 11:11 ` jakub at gcc dot gnu dot org 2008-04-01 13:32 ` jakub at gcc dot gnu dot org 2008-04-03 10:24 ` jakub at gcc dot gnu dot org 2008-04-03 11:29 ` jakub at gcc dot gnu dot org 2008-04-04 18:11 ` jason at redhat dot com [this message] 2008-04-04 18:18 ` pinskia at gcc dot gnu dot org 2008-04-04 19:03 ` pinskia at gcc dot gnu dot org 2008-04-07 10:53 ` jakub at gcc dot gnu dot org 2008-04-22 9:49 ` jakub at gcc dot gnu dot org 2008-04-24 16:31 ` jakub at gcc dot gnu dot org 2008-04-24 16:33 ` jakub at gcc dot gnu dot org 2008-04-24 18:49 ` [Bug c++/35758] " jakub at gcc dot gnu dot org 2008-06-06 15:04 ` rguenth at gcc dot gnu dot org 2008-07-04 19:42 ` jsm28 at gcc dot gnu dot org 2008-11-14 16:39 ` jason at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080404181031.16390.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).