misc/174549: UINT64_MAX missing in C++ Program
b.f.
bf1783 at googlemail.com
Mon Dec 24 10:00:01 UTC 2012
The following reply was made to PR misc/174549; it has been noted by GNATS.
From: "b.f." <bf1783 at googlemail.com>
To: bug-followup at FreeBSD.org, Robin Carey <robin.carey1 at googlemail.com>
Cc:
Subject: Re: misc/174549: UINT64_MAX missing in C++ Program
Date: Mon, 24 Dec 2012 09:51:59 +0000
UINT*_MAX and stdint.h are governed by the C99 standard (Section
7.18). A footnote in that that section states that "C++
implementations should define these macros only when
__STDC_LIMIT_MACROS is defined before <stdint.h> is included." The
system headers in FreeBSD and many other implementations follow this
recommendation. If you want to use these macros in C++ code
unconditionally, then you should include <cstdint> instead, as
described in the C++11 standard ( the cstdint.syn section in Chapter
18). You probably ought to be doing this anyway.
b.
More information about the freebsd-bugs
mailing list