[cfe-dev] errors running clang/test testcases
Bjørn Roald
bjorn at 4roald.org
Mon Jan 14 03:28:16 PST 2008
Steve Naroff skrev:
> Thanks much for the test case. Commit r45951 should fix this problem.
>
> Please let me know if you have any problems,
The testcase I sendt was solved by r45951 :-). However clang is still
not happy with test/CodeGen/mandel.c. This macro expanded code is nuts,
so don't ask me what it mean or whether it make sence to support this
stuff. Looking at it closer I think the last one I sendt may have been
a side-step from the original problem, but nevertheless a clang/gcc
diff. I now get the following set of interesting tast cases. The two
first testcases involve casting boolean value to (void*), which seems to
cause different behaviour than gcc. The last 3 simply show that the
compilers does the same thing if dealing with int directly or if the
conditional operation is removed.
void f3_2_3_0() { __typeof__(* (__typeof__ (0 ? (double*) 0 : (void *)
(!(((double) 0.25) && ((double) 0.25 - 1))))) 0 ) a;} // gcc: Ok , clang
error: variable has incomplete type ...
void f3_2_3_1() { __typeof__(* (__typeof__ (0 ? (double*) 0 : (void *)
(!(int) 1))) 0 ) a;} // gcc: Ok , clang error: variable has incomplete
type ...
void f3_2_3_2() { __typeof__(* (__typeof__ (0 ? (double*) 0 : (void *) (
(int) 0))) 0 ) a;} // gcc/clang: Ok
void f3_2_3_3() { __typeof__(* (__typeof__ (0 ? (double*) 0 : (void *) (
(int) 1))) 0 ) a;} // gcc/clang: error
void f3_2_3_4() { __typeof__(* (__typeof__ ( (void *)
(!(int) 1))) 0 ) a;} // gcc/clang: error
regards,
--
Bjørn
More information about the cfe-dev
mailing list