public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4642: Very strange annoying warning about templates
@ 2002-09-15 15:40 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-09-15 15:40 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, khlebnikov, nobody

Synopsis: Very strange annoying warning about templates

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Sun Sep 15 15:40:45 2002
State-Changed-Why:
    confirmed. This kind of thing would be suitable for a
    -Wlanguage-lawyer, which would normally be on.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4642


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/4642: Very strange annoying warning about templates
@ 2003-01-22 19:42 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-22 19:42 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, khlebnikov, nobody

Synopsis: Very strange annoying warning about templates

State-Changed-From-To: analyzed->closed
State-Changed-By: bangerth
State-Changed-When: Wed Jan 22 19:42:53 2003
State-Changed-Why:
    Fixed with new parser

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4642


^ permalink raw reply	[flat|nested] 3+ messages in thread

* c++/4642: Very strange annoying warning about templates
@ 2001-10-22  1:36 khlebnikov
  0 siblings, 0 replies; 3+ messages in thread
From: khlebnikov @ 2001-10-22  1:36 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4642
>Category:       c++
>Synopsis:       Very strange annoying warning about templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 22 01:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     G++
>Release:        any release I tried (includeing 2.95.4 and 3.0.2 prereleases)
>Organization:
>Environment:
Intel Pentium II (i686)
Debian GNU/Linux
>Description:
The compiler emits very strange warnings about rather clean code. These warnings are really annoying, because the file the compiler warns about is included in many other files (in my project). I've done stripped down testcase. The compiler doesn'e like that I've changed order of template parameters in line 11 from the line 10's order. It warns about every attempt to use the _TN type in line 12 or later. This results in two screens of useless warnings (in my code).
The command I give:
g++ -c error.cpp
The output I get:
error.cpp:13: warning: lookup of `_TN' finds `class _TN'
error.cpp:13: warning:   instead of `typename B<_NY,_TN>::_TN' from dependent base class
error.cpp:13: warning:   (use `typename B::_TN' if that's what you meant)
>How-To-Repeat:
g++ -c error.cpp
>Fix:
1) Change the order of template parameters in line 11.
2) Don't typedef "_TN" type (even private!) in the base class.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; charset=iso-8859-1; name="error.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="error.cpp"

ZEdWdGNHeGhkR1VnUEdOc1lYTnpJRjlVVkU0c0lHTnNZWE56SUY5VVRrcytDbU5zWVhOeklFRUtl
d292CkwzQjFZbXhwWXpvS2NISnBkbUYwWlRvS0NYUjVjR1ZrWldZZ1gxUlVUaUJmVkU0N0NuMDdD
Z29LZEdWdApjR3hoZEdVZ1BHTnNZWE56SUY5T1dTd2dZMnhoYzNNZ1gxUk9QZ3BqYkdGemN5QkNJ
RG9nZG1seWRIVmgKYkNCd2RXSnNhV01nUVNBOFgxUk9MQ0JmVGxrK0Nuc0tDVjlVVGlCbWRXNWpJ
Q2dwSUQwZ01Ec0tmVHNLCg==


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-22 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-15 15:40 c++/4642: Very strange annoying warning about templates nathan
  -- strict thread matches above, loose matches on Subject: below --
2003-01-22 19:42 bangerth
2001-10-22  1:36 khlebnikov

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).