public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42277] New: decltype error in template
@ 2009-12-04 17:21 jakub at gcc dot gnu dot org
2009-12-04 20:47 ` [Bug c++/42277] " jason at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-12-04 17:21 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 752 bytes --]
// { dg-options "-std=c++0x" }
struct S { int s; };
template <int N>
void foo ()
{
S s;
decltype (s.s) i;
}
diagnoses:
t.C: In function âvoid foo()â:
t.C:6: error: type of âs.sâ is unknown
t.C:6: error: invalid type in declaration before â;â token
(but compiles just fine when template <int N> line is commented out).
Both 4.4 and trunk diagnose this.
--
Summary: decltype error in template
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42277
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/42277] decltype error in template
2009-12-04 17:21 [Bug c++/42277] New: decltype error in template jakub at gcc dot gnu dot org
@ 2009-12-04 20:47 ` jason at gcc dot gnu dot org
2009-12-04 22:51 ` jason at gcc dot gnu dot org
2010-01-20 22:12 ` jason at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-12-04 20:47 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-04 20:47:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42277
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/42277] decltype error in template
2009-12-04 17:21 [Bug c++/42277] New: decltype error in template jakub at gcc dot gnu dot org
2009-12-04 20:47 ` [Bug c++/42277] " jason at gcc dot gnu dot org
@ 2009-12-04 22:51 ` jason at gcc dot gnu dot org
2010-01-20 22:12 ` jason at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-12-04 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jason at gcc dot gnu dot org 2009-12-04 22:51 -------
Subject: Bug 42277
Author: jason
Date: Fri Dec 4 22:51:12 2009
New Revision: 155002
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155002
Log:
PR c++/42277
* semantics.c (finish_decltype_type): Don't assume that op1 of a
COMPONENT_REF is always the field.
* g++.dg/cpp0x/decltype20.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype20.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42277
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/42277] decltype error in template
2009-12-04 17:21 [Bug c++/42277] New: decltype error in template jakub at gcc dot gnu dot org
2009-12-04 20:47 ` [Bug c++/42277] " jason at gcc dot gnu dot org
2009-12-04 22:51 ` jason at gcc dot gnu dot org
@ 2010-01-20 22:12 ` jason at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-01-20 22:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jason at gcc dot gnu dot org 2010-01-20 22:12 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42277
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-20 22:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-04 17:21 [Bug c++/42277] New: decltype error in template jakub at gcc dot gnu dot org
2009-12-04 20:47 ` [Bug c++/42277] " jason at gcc dot gnu dot org
2009-12-04 22:51 ` jason at gcc dot gnu dot org
2010-01-20 22:12 ` jason at gcc dot gnu dot 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).