This is the mail archive of the gcc-bugs@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]

c++/7363: bogus __alignof__ implementation


>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> >();
}


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