This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/7363: bogus __alignof__ implementation
- From: gdr at nerim dot net
- To: gcc-gnats at gcc dot gnu dot org
- Date: 20 Jul 2002 17:16:50 -0000
- Subject: c++/7363: bogus __alignof__ implementation
- Reply-to: gdr at nerim dot net
>Number: 7363
>Category: c++
>Synopsis: bogus __alignof__ implementation
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 20 11:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Gabriel Dos Reis <gdr@nerim.net>
>Release: all GCC-3.x series.
>Organization:
>Environment:
Plateform independent
>Description:
__alignof__ fails to (implictly) instantiate a specialization
where appropriate before computing the desired value.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="alignof.C"
Content-Disposition: inline; filename="alignof.C"
template<typename T>
int my_alignof()
{
return __alignof__(T);
}
template<typename>
struct X { };
int main()
{
return my_alignof<X<void> >();
}