This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Deprecate (a little bit) of C++ attribute syntax
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "jason at redhat dot com" <jason at redhat dot com>, "nathan at codesourcery dot com" <nathan at codesourcery dot com>
- Date: 14 Aug 2002 12:17:47 +0200
- Subject: Re: RFC: Deprecate (a little bit) of C++ attribute syntax
- Organization: CodeSourcery, LLC
- References: <5100000.1029307053@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
[...]
| > Do you think it is the same reason why it seems to ignore
| > attributes for nested typedef-names? I.e. in
| >
| > struct A {
| > struct X { } __attribute__((__aligned__(4)));
| > typedef struct { } Y __attribute__((__aligned__(4)));
| > };
|
| That's probably caused by something else -- but it could well be related.
Thanks, I'll keep investogating.
| > I mostly agree with all of yours suggestions -- as you know, I've been
| > working on the attribute stuff these days. The oddity you mention may
| > be more prenicious. Consider:
| >
| > template<typename T>
| > struct X { } __attribute__((__aligned__(__alignof__(T))));
| >
| > This may, at first sight, look innocent, but it doesn't do the obvious
| > thing one thinks of.
|
| Again, similar -- but different.
Aha, thanks.
[...]
| This syntax (unlike the one I mentioned) has been supported by the C
| front end for a long time, which makes it much harder to deprecate in
| C++.
So in this case, we just document the issue, right?
-- Gaby