Hi Απόστολος,

On 13.12.2013 20:28, Απόστολος Συρόπουλος wrote:
While compiling comphelper under Solaris, compilation stopped with the 
following error message:

In file included from 
/extra/sources/OpenOffice/aoo4/main/comphelper/source/misc/locale.cxx:26:0:
/extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/inc/comphelper/locale.hxx:74:29:
 error: expected unqualified-id before numeric constant
/extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/inc/comphelper/locale.hxx:77:29:
 error: expected unqualified-id before numeric constant
/extra/sources/OpenOffice/aoo4/main/comphelper/source/misc/locale.cxx:115:22: 
error: expected unqualified-id before numeric constant
/extra/sources/OpenOffice/aoo4/main/comphelper/source/misc/locale.cxx:142:22: 
error: expected unqualified-id before numeric constant

The problem with lines 74 and 77 is that the symbols CS and ES are defined in 
/usr/include/sys/regset.h The short program

The CS and ES defines of regset.h are unrelated to the problem you are seeing. The declarations of CS and ES needed here are in locale.hxx as static methods of the Locale class. This class is in defined there too, but it is not complete yet when these methods are declared, so the compiler has a problem to recognize the return type.

This compiler behavior is a bit unusual but as it is valid C++ we need to change things to be more compliant. If just created an issue for it [1] and attached a patch [2] that should solve it. It makes the code more compliant and is faster because it avoids an object copy.

[1] https://issues.apache.org/ooo/show_bug.cgi?id=123859
[2] https://issues.apache.org/ooo/attachment.cgi?id=82111&action=diff

Please try out the patch and report back. Eventually adding a forward declaration to class Locale in locale.hxx itself is needed.

I had the same problem when I was trying to compile file Bidi.cpp of the 
graphite2-1.2.1 source tree.
In this case, upstream had modified the file but here I have no idea what is 
the best solution. As for
the other errors I guess they might have something to do with the previous 
errors.

AOO uses a different version of graphite that doesn't contain Bidi.cpp
The generic versions out there have no dependency on AOO's internals so this looks like a different problem.

Herbert


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to