public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53618] New: segfault on self-referential class partial specialization argument
@ 2012-06-09 4:47 potswa at mac dot com
2012-06-09 5:48 ` [Bug c++/53618] " potswa at mac dot com
2013-08-22 19:40 ` paolo.carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: potswa at mac dot com @ 2012-06-09 4:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53618
Bug #: 53618
Summary: segfault on self-referential class partial
specialization argument
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: potswa@mac.com
I was trying a new approach to SFINAE on 4.7.0 and ICEd instead. Not sure if
this is valid. The idea is to check whether the specialization is already a
complete class while forming the partial specialization arguments.
(http://stackoverflow.com/questions/10958435)
---
template< int > struct ic;
template< typename t, typename c = ic< 0 > >
struct is_dereferenceable;
template< typename t >
struct is_dereferenceable< t, ic< true? 0 : * t() > > {};
template< typename t >
struct is_dereferenceable< t, ic< sizeof (is_dereferenceable< t >) > > {};
is_dereferenceable< char * > i;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/53618] segfault on self-referential class partial specialization argument
2012-06-09 4:47 [Bug c++/53618] New: segfault on self-referential class partial specialization argument potswa at mac dot com
@ 2012-06-09 5:48 ` potswa at mac dot com
2013-08-22 19:40 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: potswa at mac dot com @ 2012-06-09 5:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53618
David Krauss <potswa at mac dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
--- Comment #1 from David Krauss <potswa at mac dot com> 2012-06-09 05:47:53 UTC ---
I have been alerted to the fact that the sizeof expression is invalid because
it can't be applied to an incomplete type. So this is crashes on invalid code.
And the crashing specialization is extraneous anyway, such a case should be
handled by the primary template. (Which can be said in general of such a
mechanism, should anyone want it.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/53618] segfault on self-referential class partial specialization argument
2012-06-09 4:47 [Bug c++/53618] New: segfault on self-referential class partial specialization argument potswa at mac dot com
2012-06-09 5:48 ` [Bug c++/53618] " potswa at mac dot com
@ 2013-08-22 19:40 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-08-22 19:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53618
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-08-22
Ever confirmed|0 |1
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Related to c++/51488 & co.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-22 19:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-09 4:47 [Bug c++/53618] New: segfault on self-referential class partial specialization argument potswa at mac dot com
2012-06-09 5:48 ` [Bug c++/53618] " potswa at mac dot com
2013-08-22 19:40 ` paolo.carlini at oracle dot com
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).