public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8427: internal error on ambiguous function template
@ 2002-11-01 15:35 bangerth
0 siblings, 0 replies; 5+ messages in thread
From: bangerth @ 2002-11-01 15:35 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, rl
Synopsis: internal error on ambiguous function template
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Fri Nov 1 15:35:32 2002
State-Changed-Why:
Please send us a testcase according to the Web page
referenced in the compiler error
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8427
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/8427: internal error on ambiguous function template
@ 2002-11-04 7:17 bangerth
0 siblings, 0 replies; 5+ messages in thread
From: bangerth @ 2002-11-04 7:17 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, rl
Synopsis: internal error on ambiguous function template
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Mon Nov 4 07:17:42 2002
State-Changed-Why:
gcc 3.3 now says
-----------------------------
home/bangerth> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c gcc01.cpp -o /dev/null
gcc01.cpp: In function `int main()':
gcc01.cpp:8: error: call of overloaded `f(g<2>)' is ambiguous
gcc01.cpp:3: error: candidates are: void f(g<(i / j)>) [with int i = 4, int j = 2]
gcc01.cpp:4: error: void f(g<j>) [with int i = 4, int j = 2]
The message seems correct to me. I think you're just out
of luck here, since the language does not provide you with
a way to disambiguate which function you wanted to call.
Regards
W.
Original code:
template<int i> struct g {};
template<int i, int j> void f(g<i/j>) { }
template<int i, int j> void f(g<j>) { }
int main()
{
f<4,2>(g<4/2>());
}
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8427
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/8427: internal error on ambiguous function template
@ 2002-11-04 7:13 bangerth
0 siblings, 0 replies; 5+ messages in thread
From: bangerth @ 2002-11-04 7:13 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, rl
Synopsis: internal error on ambiguous function template
State-Changed-From-To: feedback->open
State-Changed-By: bangerth
State-Changed-When: Mon Nov 4 07:13:28 2002
State-Changed-Why:
Attachment provided:
---------------------------
template<int i> struct g {};
template<int i, int j> void f(g<i/j>) { }
template<int i, int j> void f(g<j>) { }
int main()
{
f<4,2>(g<4/2>());
}
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8427
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c++/8427: internal error on ambiguous function template
@ 2002-11-02 7:46 Ray Lischner
0 siblings, 0 replies; 5+ messages in thread
From: Ray Lischner @ 2002-11-02 7:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/8427; it has been noted by GNATS.
From: Ray Lischner <rl@tempest-sw.com>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c++/8427: internal error on ambiguous function template
Date: Sat, 2 Nov 2002 07:43:57 -0800
--------------Boundary-00=_91HYFASQ54ZWRRDTY1SH
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
On Friday 01 November 2002 03:35 pm, you wrote:
> Synopsis: internal error on ambiguous function template
>
> State-Changed-From-To: open->feedback
> State-Changed-By: bangerth
> State-Changed-When: Fri Nov 1 15:35:32 2002
> State-Changed-Why:
> Please send us a testcase according to the Web page
> referenced in the compiler error
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&databas
>e=gcc&pr=8427
Your file attachment feature seems not to be working. Here is the file
again.
--
Ray Lischner, author of C++ in a Nutshell (forthcoming)
(http://www.tempest-sw.com/cpp/)
--------------Boundary-00=_91HYFASQ54ZWRRDTY1SH
Content-Type: text/x-c++src;
charset="iso-8859-1";
name="gcc01.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="gcc01.cpp"
template<int i> struct g {};
template<int i, int j> void f(g<i/j>) { }
template<int i, int j> void f(g<j>) { }
int main()
{
f<4,2>(g<4/2>());
}
--------------Boundary-00=_91HYFASQ54ZWRRDTY1SH--
^ permalink raw reply [flat|nested] 5+ messages in thread
* c++/8427: internal error on ambiguous function template
@ 2002-11-01 15:26 rl
0 siblings, 0 replies; 5+ messages in thread
From: rl @ 2002-11-01 15:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 8427
>Category: c++
>Synopsis: internal error on ambiguous function template
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Fri Nov 01 15:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Ray Lischner
>Release: 3.2
>Organization:
>Environment:
Linux, Suse 7.2, kernel 2.4.19, SMP, i686
>Description:
g++ gcc01.cpp
gcc01.cpp: In function `int main()':
gcc01.cpp:8: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
g++ gcc01.cpp
>Fix:
Segfault only seems to happen with incorrect source code, so work around is to fix the source code.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-04 15:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-01 15:35 c++/8427: internal error on ambiguous function template bangerth
-- strict thread matches above, loose matches on Subject: below --
2002-11-04 7:17 bangerth
2002-11-04 7:13 bangerth
2002-11-02 7:46 Ray Lischner
2002-11-01 15:26 rl
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).