[Bug c++/37653] New: Duplicate messages and warnings depending on the program
sutambe at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 26 01:31:00 GMT 2008
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
More information about the Gcc-bugs
mailing list