This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/8526: parsing error


>Number:         8526
>Category:       c++
>Synopsis:       parsing error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 11 07:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jozef Kosoru
>Release:        3.2
>Organization:
>Environment:
Linux
>Description:
g++ is not able to copile this trivial code:

---------------------------------------------
template<typename T_>
class A
{
};

class C
{
public:
    C(const A<int>&, int) {}
};

int main()
{
    C(A<int>(), 0);

    C c(A<int>(), 0);
}
---------------------------------------------

param.cpp: In function `int main()':
param.cpp:14: parse error before `,' token
param.cpp:16: type specifier omitted for parameter
param.cpp:16: parse error before numeric constant
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]