Am 04.10.2013 11:46, schrieb Daniele E. Domenichelli:
Hello,

On 02/10/13 16:23, Brad King wrote:
They look good to me.  We'll see how the dashboards do.

Unfortunately one test is failing on several machines:

http://open.cdash.org/testSummary.php?project=1&name=CMakeOnly.CheckStructHasMember&date=2013-10-03

This is the test that is failing, according to my knowledge of C it
should build, even with very old compilers...


struct struct_with_member
{
    int foo;
};

int main()
{
    struct struct_with_member *tmp;
    tmp->foo;
    return 0;
}


Am I missing something? Is it possible to access to the
Tests/CMakeOnly/CheckStructHasMember-build/CMakeFiles/CMakeError.log
files on the build machines to have a better idea of what is going on?

Just some thoughts:
-some compilers may error out because you dereference an uninitialized pointer -some compilers may complain because you perform an operation that does nothing, maybe prepend it with a (void) to mark that as intentional

What about this:

     struct struct_with_member tmp, *tmpp;
     tmp.foo = 0;
     tmpp = &tmp;
     return tmpp->foo;

Eike
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to