I get the following errors/warnings when compiling lyxstring.C with
cxx. Most of them (except for the incomplete type stuff) are a bit
problematic to me. Anyone cares to enlighten me?
mycxx -std strict_ansi -DHAVE_CONFIG_H -I. -I../../../lyx-devel/src/support
-I../../src -I../../../lyx-devel/src/support/../ -I../../../lyx-devel/src/cheaders
-I/afs/rocq/home/meval/common/include -I/usr/local/include -g -c
../../../lyx-devel/src/support/lyxstring.C
cxx: Warning: ../../../lyx-devel/src/support/lyxstring.h, line 101: type
qualifiers are meaningless in this declaration
typedef const reference const_reference;
----------------^
cxx: Error: ../../../lyx-devel/src/support/lyxstring.h, line 539:
class "lyxstring::Srep" is inaccessible
return new Srep(sz, s);
-----------------------------------^
cxx: Warning: ../../../lyx-devel/src/support/lyxstring.C, line 40: unrecognized
preprocessing directive
#warning temporarily here for debugging purposes only
-^
cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 123: a nonstatic
member reference must be relative to a specific object
Assert(object->rep->ref < (1 << 8*sizeof(lyxstring::Srep::ref)) - 1);
------------------------------------------------------------------^
cxx: Warning: ../../../lyx-devel/src/support/lyxstring.C, line 1139: pointless
comparison of unsigned integer with zero
if (!n) return (ii >= 0) ? ii : npos;
---------------------------^
cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1595: no
operator ">>" matches these operands
operand types are: istream >> char [1024]
is >> nome;
-----------^
cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1603: incomplete
type is not allowed
return o.write(s.data(), s.length());
---------------^
cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1612: incomplete
type is not allowed
while(is) {
--------------^
cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1613: no
operator ">>" matches these operands
operand types are: istream >> char
is >> tmp;
-------------------^
cxx: Info: 6 errors detected in the compilation of
"../../../lyx-devel/src/support/lyxstring.C".
make: *** [lyxstring.o] Error 1
The only change I have done to lyxstring.C for now is to add
'using std::min;' after loading <algorithm>.
JMarc