public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6424: sizeof() with overload resolution (core issue 339)
@ 2002-04-23  7:16 Jens.Maurer
  0 siblings, 0 replies; 2+ messages in thread
From: Jens.Maurer @ 2002-04-23  7:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6424
>Category:       c++
>Synopsis:       sizeof() with overload resolution (core issue 339)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 23 07:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jens Maurer
>Release:        gcc version 3.0.4
>Organization:
>Environment:
Linux 2.4.17	
>Description:
The attached program causes gcc 3.0.4 to die with:

const-expression-i339.cc: In function `int main()':
const-expression-i339.cc:11: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

A similar death occurs with gcc version 3.2 20020325 (experimental)
See ISO C++ core issue 339.
>How-To-Repeat:
template <int I> struct A {};

char xxx(int);
char xxx(float);

template <class T> A<sizeof(xxx((T)0))> f(T){}

int main()
{
  f(1);
}
>Fix:
According to John Spicer, a solution might require
enhancing template name mangling to be able to include
arbitrary expressions.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/6424: sizeof() with overload resolution (core issue 339)
@ 2002-05-14  7:57 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-05-14  7:57 UTC (permalink / raw)
  To: Jens.Maurer, gcc-bugs, gcc-prs, nobody

Synopsis: sizeof() with overload resolution (core issue 339)

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Tue May 14 07:57:41 2002
State-Changed-Why:
    Confirmed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6424


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-14 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23  7:16 c++/6424: sizeof() with overload resolution (core issue 339) Jens.Maurer
2002-05-14  7:57 lerdsuwa

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).