[ 
https://issues.apache.org/jira/browse/STDCXX-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463367
 ] 

Martin Sebor commented on STDCXX-317:
-------------------------------------

Looks like this might be the gcc bug entry:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9103

> [gcc 3.2.3] treats object declaration as a function
> ---------------------------------------------------
>
>                 Key: STDCXX-317
>                 URL: https://issues.apache.org/jira/browse/STDCXX-317
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: gcc 3.2.3
>            Reporter: Martin Sebor
>
> The program below fails to compile with gcc 3.2.3:
> $ cat t.cpp && g++ --version && g++ t.cpp
> template <class T> struct A { A (T, int) { } void foo () { } };
> template <class T> void bar ()
> {
>     A<T> a (T (), 0);
>     a.foo ();
> }
> int main ()
> {
>     bar<int>();
> }
> g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> t.cpp: In function `void bar()':
> t.cpp:4: type specifier omitted for parameter
> t.cpp:4: syntax error before numeric constant
> t.cpp: In function `void bar() [with T = int]':
> t.cpp:11:   instantiated from here
> t.cpp:6: request for member `foo' in `a(...) [with T = int]', which is of 
>    non-aggregate type `A<int> ()(...)'

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to