This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/14306] comparison of postype and size_t breaks ACE
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Feb 2004 10:52:27 -0000
- Subject: [Bug libstdc++/14306] comparison of postype and size_t breaks ACE
- References: <20040226090715.14306.schmid@snake.iap.physik.tu-darmstadt.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pcarlini at suse dot de 2004-02-26 10:52 -------
Hi.
The ACE people should be informed that they are using not portable constructs:
27.4.3.2 presents the requirement for fpos (streampos, that is) and definitely
is not supposed to be convertible to size_t or any integer type. In general the
correct approach is converting it to a streamoff, like
if (streamoff(pos) > max_size) return 42;
Paolo.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14306