On Sat, Feb 13, 2010 at 11:21:01PM +0100, Frank Thieme wrote:
> Hi!
> 
> I found the problem - I have to use "-library=stlport4" because of the
> use of boost. But now there are some more problems:
> 
> 1. Trailing commas in enums - this is part of C99, but not of C++ standard

Right.
 
> 2. src/support/debug.h: DEBUG is defined as DEBUG      = (1 << 31)
> what is out of range for enum (32 bit) and I guess should be DEBUG
>  = (1 << 30) as there is no 30, yet.

1 << 31  is within the 32 bit range.

I don't think LyX is supported on machines with ints with less than 
32 bit so I don't see the problem here.

> 3. a forgotten static_cast in src/support/FileName.cpp


        @@ -558,7 +558,7 @@
                crc.process_block(beg, end);
                result = crc.checksum();
         
        -       munmap(mm, info.st_size);
        +       munmap(static_cast<char *>(mm), info.st_size);
                close(fd);

This seems to be Solaris-specific. So a configure check might be needed
(unless we decide an #ifdef is fine...)
 
        docstring indent;
        if (ind < 0) {
-               indent.insert(0, -ind, ' ');
+               indent.insert(static_cast<unsigned>(0), -ind, ' ');

This looks strange. Why is that needed? Is the compiler confused by overloads?  
If so, '0u' might look a bit better than 'static_cast<unsigned>(0)'

Andre'

Reply via email to