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]
Other format: [Raw text]

Re: Compile error - basic_string.h


"Redmer, Autumn \(A.\)" <aredmer@ford.com> writes:

> We are moving an application from HP UX to Linux.  When I try to compile
> a couple of the programs on Linux (using gcc 3.3.3), I get errors like
> this:
> 
> In file included from /usr/include/g++/string:53,
>                  from /usr/include/g++/bits/locale_classes.h:47,
>                  from /usr/include/g++/bits/ios_base.h:47,
>                  from /usr/include/g++/ios:49,
>                  from /usr/include/g++/ostream:45,
>                  from /usr/include/g++/iostream:45,
>                  from FlexCode.h:26,
>                  from Constraint.h:29,
>                  from AnalysisUtils.h:19,
>                  from AnalysisUtils.cpp:16:
> /usr/include/g++/bits/basic_string.h: In member function `int
>    std::basic_string<_CharT, _Traits, _Alloc>::compare(const
>    std::basic_string<_CharT, _Traits, _Alloc>&) const':
> /usr/include/g++/bits/basic_string.h:824: error: syntax error before `;'
> token
> 
> Can you give me any suggestions on where I should try to start debugging
> this?

Look for a preprocessor macro which might be messing up the header
file.

One way to do this is to run the compiler with --save-temps to
generate a .ii file.  Look for the basic_string.h code in the .ii
file.  Compare it to the same code in the .h file.  See if there are
any interesting differences.

Ian


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