This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug libstdc++/14306] comparison of postype and size_t breaks ACE


------- 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


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