public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38485] New: possible regression: expected primary-expression at end of input
@ 2008-12-11 12:36 gcc at spatium dot org
2008-12-11 12:37 ` [Bug c++/38485] " gcc at spatium dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gcc at spatium dot org @ 2008-12-11 12:36 UTC (permalink / raw)
To: gcc-bugs
Compressed .ii file goes as attachment.
gcc 4.3.2: (reports no errors)
my gcc:
g++ -c kded_kephal_automoc.ii
In file included from
/src/a/kde/4.1.80/o/kdebase-workplace/libs/kephal/kded_kephal/moc_xmlconfigurations.cpp:11,
from
/src/a/kde/4.1.80/o/kdebase-workplace/libs/kephal/kded_kephal/kded_kephal_automoc.cpp:6:
/src/a/kde/4.1.80/o/kdebase-workplace/libs/kephal/kded_kephal/../../../../../kdebase-workspace-4.1.80/libs/kephal/configurations/xml/xmlconfigurations.h:104:
error: expected primary-expression at end of input
g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../svn/configure --prefix=/usr --enable-threads
--enable-shared --enable-languages=c,c++ --host=x86_64-unknown-linux-gnu
--with-system-zlib --with-x --enable-java-awt=gtk
--enable-targets=x86_64-unknown-linux-gnu --with-arch=athlon64
--with-tune=athlon64 --with-cpu=athlon64 --disable-multilib
--enable-__cxa_atexit --enable-libada --enable-gtk-cairo
--enable-libgcj-multifile --with-long-double-128 --disable-nls
Thread model: posix
gcc version 4.4.0 20081211 (experimental) (GCC)
The problem is at line 9355 of the .ii: (comment it out and it works)
void translateToOther(QMap<int, QRect> & layout, Output * base, QMap
<int, int> match = (QMap<int, int>()));
...and from what I could figure out, it is the right-side of the '=' default
parameter assignment.
>From my understanding, the code sould be equivalent to this small test case:
template <typename T1, typename T2> class blah {
T1 whatever1;
T2 whatever2;
public:
inline blah() {}
inline T1 get1() { return whatever1; }
};
int foo(blah <int, int> bar = (blah <int, int> ())) {
return bar.get1();
}
int main(void) {
return foo();
}
However, this code compiles and runs perfectly on my gcc.
--
Summary: possible regression: expected primary-expression at end
of input
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at spatium dot org
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] possible regression: expected primary-expression at end of input
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
@ 2008-12-11 12:37 ` gcc at spatium dot org
2008-12-12 0:29 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gcc at spatium dot org @ 2008-12-11 12:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from gcc at spatium dot org 2008-12-11 12:35 -------
Created an attachment (id=16883)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16883&action=view)
the faulty .ii file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] possible regression: expected primary-expression at end of input
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
2008-12-11 12:37 ` [Bug c++/38485] " gcc at spatium dot org
@ 2008-12-12 0:29 ` pinskia at gcc dot gnu dot org
2008-12-12 0:31 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-12 0:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-12 00:28 -------
Reduced testcase:
template <class Key, class T>
class QMap { };
class XMLConfigurations {
void translateToOther(QMap<int, int> match = (QMap<int, int>()));
};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] possible regression: expected primary-expression at end of input
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
2008-12-11 12:37 ` [Bug c++/38485] " gcc at spatium dot org
2008-12-12 0:29 ` pinskia at gcc dot gnu dot org
@ 2008-12-12 0:31 ` pinskia at gcc dot gnu dot org
2008-12-12 0:34 ` [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-12 0:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-12-12 00:29 -------
Related to PR 57, one of the oldest GCC bugs which are still opened (there is a
defect report against the C++ standard and that is why it is still opened).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
` (2 preceding siblings ...)
2008-12-12 0:31 ` pinskia at gcc dot gnu dot org
@ 2008-12-12 0:34 ` pinskia at gcc dot gnu dot org
2008-12-12 6:56 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-12 0:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2008-12-12 00:31 -------
Jason since you changed this area for 4.4, do you know if this is valid code or
not? Comment #2 contains the reduced testcase.
Thanks,
Andrew Pinski
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
GCC host triplet|x86_64-unknown-linux-gnu |
Summary|possible regression: |[4.4 Regression] GCC can't
|expected primary-expression |parse a parenthesized comma
|at end of input |in a template-id within a
| |default argument
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
` (3 preceding siblings ...)
2008-12-12 0:34 ` [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument pinskia at gcc dot gnu dot org
@ 2008-12-12 6:56 ` jason at gcc dot gnu dot org
2008-12-12 6:56 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-12-12 6:56 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 |2008-12-12 06:54:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
` (4 preceding siblings ...)
2008-12-12 6:56 ` jason at gcc dot gnu dot org
@ 2008-12-12 6:56 ` jason at gcc dot gnu dot org
2008-12-18 15:57 ` jason at gcc dot gnu dot org
2008-12-18 15:57 ` jason at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-12-12 6:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jason at gcc dot gnu dot org 2008-12-12 06:55 -------
I think this testcase is clearly valid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
` (6 preceding siblings ...)
2008-12-18 15:57 ` jason at gcc dot gnu dot org
@ 2008-12-18 15:57 ` jason at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-12-18 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jason at gcc dot gnu dot org 2008-12-18 15:55 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
` (5 preceding siblings ...)
2008-12-12 6:56 ` jason at gcc dot gnu dot org
@ 2008-12-18 15:57 ` jason at gcc dot gnu dot org
2008-12-18 15:57 ` jason at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-12-18 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at gcc dot gnu dot org 2008-12-18 15:56 -------
Subject: Bug 38485
Author: jason
Date: Thu Dec 18 15:54:59 2008
New Revision: 142815
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142815
Log:
PR c++/38485
* parser.c (cp_parser_token_starts_cast_expression): An EOF
can't start a cast-expression.
Added:
trunk/gcc/testsuite/g++.dg/parse/defarg13.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38485
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-12-18 15:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-11 12:36 [Bug c++/38485] New: possible regression: expected primary-expression at end of input gcc at spatium dot org
2008-12-11 12:37 ` [Bug c++/38485] " gcc at spatium dot org
2008-12-12 0:29 ` pinskia at gcc dot gnu dot org
2008-12-12 0:31 ` pinskia at gcc dot gnu dot org
2008-12-12 0:34 ` [Bug c++/38485] [4.4 Regression] GCC can't parse a parenthesized comma in a template-id within a default argument pinskia at gcc dot gnu dot org
2008-12-12 6:56 ` jason at gcc dot gnu dot org
2008-12-12 6:56 ` jason at gcc dot gnu dot org
2008-12-18 15:57 ` jason at gcc dot gnu dot org
2008-12-18 15:57 ` 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).