public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "richard.guenther at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55742] [4.8 regression] __attribute__ in class function declaration cause "prototype does not match" errors.
Date: Fri, 18 Jan 2013 09:49:00 -0000	[thread overview]
Message-ID: <bug-55742-4-F47hYsctmK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55742-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742

--- Comment #31 from richard.guenther at gmail dot com <richard.guenther at gmail dot com> 2013-01-18 09:49:11 UTC ---
On Thu, Jan 17, 2013 at 11:45 PM, xinliangli at gmail dot com
<gcc-bugzilla@gcc.gnu.org> wrote:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742
>
> --- Comment #30 from davidxl <xinliangli at gmail dot com> 2013-01-17 22:45:22 UTC ---
> (In reply to comment #26)
>> On Wed, Jan 16, 2013 at 5:02 PM, jakub at gcc dot gnu.org
>> <gcc-bugzilla@gcc.gnu.org> wrote:
>> >
>> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742
>> >
>> > --- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-16 16:02:35 UTC ---
>> > The actual merging of target attribute isn't that important, what would be more
>> > important is that other attributes are merged together in that case and the
>> > decls treated as the same thing.
>> >
>> > Anyway, with target("any") attribute, what would happen for
>> > void foo () __attribute__((target ("avx")));
>> > void foo () __attribute__((target ("any")));
>>
>> IMHO the re-declaration with a different target attribute should be an error.
>
> This can be a clean way to handle declarations. The definition should have
> either 'default' attribute or a matching target attribute.
>
>> A proper "forward" declaration for a function with MV applied shouldn't have
>> any target attribute.
>
> What does this sentence mean?

I think it would require to list all MV variants in the single declaration

void foo () __attribute__ ((target ("avx"), target ("any")));

but I suppose this goes against the idea of treating MV variants as regular
overloads which you can all declare.

Of course the issue whether / how to "merge" target attributes then returns.
I didn't pay too close attention, but if you settled on using a different
attribute name and then never perform merging of that attribute that would
indeed work.

Richard.

>
> David
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.


  parent reply	other threads:[~2013-01-18  9:49 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 16:46 [Bug c++/55742] New: " dnovillo at gcc dot gnu.org
2012-12-19 23:30 ` [Bug c++/55742] " tmsriram at google dot com
2012-12-20 18:00 ` dnovillo at gcc dot gnu.org
2012-12-20 18:21 ` tmsriram at google dot com
2012-12-20 18:24 ` dnovillo at google dot com
2012-12-20 19:37 ` tmsriram at google dot com
2012-12-20 19:52 ` xinliangli at gmail dot com
2013-01-10 22:10 ` tmsriram at google dot com
2013-01-14 14:33 ` [Bug c++/55742] [4.8 regression] " jason at gcc dot gnu.org
2013-01-14 14:35 ` rguenth at gcc dot gnu.org
2013-01-14 14:38 ` rguenth at gcc dot gnu.org
2013-01-14 15:14 ` jakub at gcc dot gnu.org
2013-01-14 17:17 ` xinliangli at gmail dot com
2013-01-14 17:21 ` xinliangli at gmail dot com
2013-01-14 17:46 ` tmsriram at google dot com
2013-01-14 17:50 ` xinliangli at gmail dot com
2013-01-14 18:07 ` tmsriram at google dot com
2013-01-14 18:26 ` jakub at gcc dot gnu.org
2013-01-14 18:33 ` jakub at gcc dot gnu.org
2013-01-14 20:18 ` xinliangli at gmail dot com
2013-01-14 20:24 ` jakub at gcc dot gnu.org
2013-01-14 20:30 ` xinliangli at gmail dot com
2013-01-15 18:45 ` jason at gcc dot gnu.org
2013-01-15 19:03 ` xinliangli at gmail dot com
2013-01-16  8:12 ` jakub at gcc dot gnu.org
2013-01-16 15:54 ` jason at gcc dot gnu.org
2013-01-16 16:03 ` jakub at gcc dot gnu.org
2013-01-16 16:06 ` richard.guenther at gmail dot com
2013-01-16 17:21 ` tmsriram at google dot com
2013-01-16 17:26 ` tmsriram at google dot com
2013-01-16 20:04 ` jason at gcc dot gnu.org
2013-01-17 22:45 ` xinliangli at gmail dot com
2013-01-18  9:49 ` richard.guenther at gmail dot com [this message]
2013-01-18 14:19 ` jakub at gcc dot gnu.org
2013-01-18 16:59 ` jason at gcc dot gnu.org
2013-01-18 17:28 ` xinliangli at gmail dot com
2013-01-18 17:52 ` jakub at gcc dot gnu.org
2013-01-18 18:03 ` tmsriram at google dot com
2013-01-18 18:08 ` tmsriram at google dot com
2013-01-18 19:53 ` tmsriram at google dot com
2013-01-19 10:14 ` jakub at gcc dot gnu.org
2013-01-19 10:28 ` jakub at gcc dot gnu.org
2013-01-19 17:18 ` tmsriram at google dot com
2013-01-21 11:41 ` jakub at gcc dot gnu.org
2013-01-23 16:39 ` jakub at gcc dot gnu.org
2013-01-30 18:05 ` jakub at gcc dot gnu.org
2013-01-30 18:18 ` jakub at gcc dot gnu.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=bug-55742-4-F47hYsctmK@http.gcc.gnu.org/bugzilla/ \
    --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: link
Be 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).