This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/3876: c++ #define INFINITY in cmath



>Number:         3876
>Category:       c++
>Synopsis:       c++ #define INFINITY in cmath
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 30 05:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Konstantin Osipov
>Release:        3.0
>Organization:
>Environment:
System: Linux rabid 2.4.2-k1 #15 ðÔÎ íÁÊ 4 19:45:40 MSD 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure 
>Description:
	#define in <cmath> hides legal variable name 'INFINITY'
>How-To-Repeat:
--test.cpp
#include <cmath>
int main(int, char*[])
{
	const unsigned INFINITY = ~0U;
}
--
compile it:
$ g++ test.cpp
Output:

test.cpp: In function `int main()':
test.cpp:4: parse error before `__extension__'

$ g++ -v
Configured with: ./configure
Thread model: single
gcc version 3.0

$ uname -a
Linux rabid 2.4.2-k1 #15 ðÔÎ íÁÊ 4 19:45:40 MSD 2001 i686 unknown
$ cat /etc/issue

Welcome to SuSE Linux 7.1 (i386) - Kernel \r (\l).


>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]