public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37653]  New: Duplicate messages and warnings depending on the program
@ 2008-09-26  1:31 sutambe at yahoo dot com
  2008-09-26  1:35 ` [Bug c++/37653] " pinskia at gcc dot gnu dot org
  2008-10-03 20:57 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 4+ messages in thread
From: sutambe at yahoo dot com @ 2008-09-26  1:31 UTC (permalink / raw)
  To: gcc-bugs

template <char I>
struct Int2Type
{
    enum { value = I };
    typedef Int2Type<I> type;
    typedef typename Int2Type<I+1>::type next;
};
int main(void)
{
    Int2Type<5> i;
}
g++ compiler compiles the above program successfully (as it should) but spits
out the same warning message 5 times. If you change digit 5 in main to say 7,
it spits out 7 identical warnings! Essentially, the warnings are repeated as
many number of times as the integer parameter to the Int2Type template. Please
try  g++ "source-file" -o "output-file" -Wall 2>&1 | grep warning


-- 
           Summary: Duplicate messages and warnings depending on the program
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sutambe at yahoo dot com
  GCC host triplet: x86-linux-gnu (Red Hat 4.1.2-33)
GCC target triplet: x86-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37653


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

* [Bug c++/37653] Duplicate messages and warnings depending on the program
  2008-09-26  1:31 [Bug c++/37653] New: Duplicate messages and warnings depending on the program sutambe at yahoo dot com
@ 2008-09-26  1:35 ` pinskia at gcc dot gnu dot org
  2008-10-03 20:57 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-26  1:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-09-26 01:33 -------
Works correctly on the trunk, that is it does not warn at all.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37653


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

* [Bug c++/37653] Duplicate messages and warnings depending on the program
  2008-09-26  1:31 [Bug c++/37653] New: Duplicate messages and warnings depending on the program sutambe at yahoo dot com
  2008-09-26  1:35 ` [Bug c++/37653] " pinskia at gcc dot gnu dot org
@ 2008-10-03 20:57 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-03 20:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-10-03 20:56 -------
(In reply to comment #1)
> Works correctly on the trunk, that is it does not warn at all.

Well with -pedantic it does warn.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37653


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

* [Bug c++/37653] Duplicate messages and warnings depending on the program
       [not found] <bug-37653-4@http.gcc.gnu.org/bugzilla/>
@ 2011-09-29  0:18 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-29  0:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37653

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|gcc-bugs at gcc dot gnu.org |
         Resolution|                            |FIXED

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 00:11:07 UTC ---
Fixed in 4.6.x.


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

end of thread, other threads:[~2011-09-29  0:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-26  1:31 [Bug c++/37653] New: Duplicate messages and warnings depending on the program sutambe at yahoo dot com
2008-09-26  1:35 ` [Bug c++/37653] " pinskia at gcc dot gnu dot org
2008-10-03 20:57 ` pinskia at gcc dot gnu dot org
     [not found] <bug-37653-4@http.gcc.gnu.org/bugzilla/>
2011-09-29  0:18 ` paolo.carlini at oracle dot com

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