This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29989] New: missed #undef min/max in <limits>
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2006 12:29:18 -0000
- Subject: [Bug libstdc++/29989] New: missed #undef min/max in <limits>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
testcase:
#define max(a,b) quirk
#include <limits>
output:
/usr/include/c++/4.1.2/limits:293:22: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:323:23: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:377:23: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:428:30: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:479:32: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:530:26: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:581:24: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:632:33: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:683:22: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:734:31: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:785:23: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:836:32: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:887:28: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:938:37: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:989:24: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:1046:25: error: macro "max" requires 2 arguments,
but only 1 given
/usr/include/c++/4.1.2/limits:1103:30: error: macro "max" requires 2 arguments,
but only 1 given
i think <limits> requires the same protection as <bits/stl_algobase.h>
--
Summary: missed #undef min/max in <limits>
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29989