This is the mail archive of the gcc@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]

Re: v3.0.4 vs. v2.95.3, Solaris 8, basic_ostream/fstream weirdness


On Thu, Apr 11, 2002 at 04:17:45PM -0600, David P. Michaels wrote:
>        _rsdr_input_file.write((unsigned char *) &_rsdr_data_record.header,sizeo\
> f(RSDR_DATA_HEADER));
>        ^^^^ line 320
> 
> _rsdr_input_file is declared as type 'fstream' in the private part of class
> rsdr_file:

It's not the declaration of _rsdr_input_file that matters as much as that of
_rsdr_data_record.header.  They're specifically casting it to the wrong type.
Have they tried not typecasting it at all?


> Worth a try -- it's presently cast as unsigned char, so maybe that's
> something that changed // is now enforced // whatever.

The library for 2.x was far from ISO-standard-compliant.  (The library
predated much of the standard, if I recall.)  The rewritten library for
3.x follows the standard and is much stricter.  Your older C++ code may
not actually qualify as C++ anymore.


> that's when I started realizing: "Looks like they're shooting themselves in
> the foot here."  I likened it to doing a #include <iso/stdio_iso.h> instead
> of #include <stdio.h> ... although it might not be that drastic.

That's a good comparison.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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