public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56699] New: Failed for sizeof (non-static member) in lambda expression
@ 2013-03-23 16:06 frankhb1989 at gmail dot com
2013-03-23 16:29 ` [Bug c++/56699] " frankhb1989 at gmail dot com
2013-03-25 21:23 ` [Bug c++/56699] [4.8/4.9 regression] " jason at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: frankhb1989 at gmail dot com @ 2013-03-23 16:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56699
Bug #: 56699
Summary: Failed for sizeof (non-static member) in lambda
expression
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: frankhb1989@gmail.com
Here are the minimal testcases:
Case 1:
struct A
{
int a;
};
struct T
{
int x;
T() : x([]{
sizeof(::A::a);
return 0;
}())
{}
};
Case 2:
struct A
{
int a;
};
void f()
{
[]{sizeof(A::a);};
}
Tested at coliru.stacked-crooked.com (g++ -v shows it's a x86-64 linux host):
Case 1:
$ g++-4.8 -fsyntax-only -std=c++11 main.cpp
main.cpp: In lambda function:
main.cpp:11:15: error: type 'A' is not a base type for type 'T'
sizeof(::A::a);
^
Case 2:
$ g++-4.8 -fsyntax-only -std=c++11 main.cpp
main.cpp: In lambda function:
main.cpp:10:15: internal compiler error: Segmentation fault
[]{sizeof(A::a);};
^
I have exactly the same errors for both cases using mingw-builds
4.8.0(i686-w64-mingw32) compiled today from sf.net on my Win7 x64 host.
>From some others, I've heard Case 1 is accepted by g++-4.8 compiled just now on
Ubuntu12.04, but the ICE still exists for Case 2.
G++ 4.7 accepts both cases.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/56699] Failed for sizeof (non-static member) in lambda expression
2013-03-23 16:06 [Bug c++/56699] New: Failed for sizeof (non-static member) in lambda expression frankhb1989 at gmail dot com
@ 2013-03-23 16:29 ` frankhb1989 at gmail dot com
2013-03-25 21:23 ` [Bug c++/56699] [4.8/4.9 regression] " jason at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: frankhb1989 at gmail dot com @ 2013-03-23 16:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56699
--- Comment #1 from frankhb1989 at gmail dot com 2013-03-23 16:29:09 UTC ---
Sorry, something was wrong, g++-4.8 on Ubuntu should also reject Case 1 in
fact.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/56699] [4.8/4.9 regression] Failed for sizeof (non-static member) in lambda expression
2013-03-23 16:06 [Bug c++/56699] New: Failed for sizeof (non-static member) in lambda expression frankhb1989 at gmail dot com
2013-03-23 16:29 ` [Bug c++/56699] " frankhb1989 at gmail dot com
@ 2013-03-25 21:23 ` jason at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-25 21:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56699
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-03-25
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
Summary|Failed for sizeof |[4.8/4.9 regression] Failed
|(non-static member) in |for sizeof (non-static
|lambda expression |member) in lambda
| |expression
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-25 21:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-23 16:06 [Bug c++/56699] New: Failed for sizeof (non-static member) in lambda expression frankhb1989 at gmail dot com
2013-03-23 16:29 ` [Bug c++/56699] " frankhb1989 at gmail dot com
2013-03-25 21:23 ` [Bug c++/56699] [4.8/4.9 regression] " jason at gcc dot gnu.org
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).