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

Re: gcc 2.95.1 HP-UX 11 problem


Skip Sopscak <dsopscak@mote.dhs.org> wrote:

>I actually got it to build with one hitch:
>
>  ../../gcc-2.95.1/gcc/fixproto[266]: 7916 Memory fault(coredump)
>
>although this did not interrupt the build.  When fixproto starts,
>make issues the statement "Various warnings and error messages
>from fixproto are normal." I doubt that a core dump falls within
>normal warnings and errors, though.
>
>Anyway, a good deal of include file processing happened before
>fixproto crashed, no more afterward, though the build continued.
>It went on to install and seemed to work, at first.  However, the
>following code, when compiled with the resulting g++, causes a
>slew of compile-time errors:
>
>//#include <string>
>#include <vector>
>
>int main()
>    {
>
>    return 0;
>    }
>
>The errors and warnings all have to do with size_t.  
>Interestingly, if the first include directive is un-commented,
>they all go away.  I strongly suspect this is because include
>file processing was not completed or was elsehow munged up.
>
>Does anyone have insight into this problem?  A fix would be
>great.  Short of this, any thoughts would be welcome, including
>hints on playing with the include file processing step in
>isolation.

Under g++ 2.8.1, I always received the warnings on memcmp/memcpy/etc
if I didn't include <string> as the first line but it would always 
compile.  I think I read somewhere in the g++ FAQ that this is
somewhat common. [*]

Your sample compiles under 2.8.1 but not 2.95.1 without <string>.

My workaround has been to _always_ include <string> up front (first line).
Wasteful, but solves the problem (even if they were just warnings
under 2.8.1, I don't really care to get them).  

jack
j-perdue@tamu.edu

[*] looked it up...

     http://egcs.cygnus.com/onlinedocs/g++FAQ_5.html#SEC56

     it only mentions 2.7.2 as a problem, but it would appear they
     haven't quite ironed things out (at least on HPUX).


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