[llvm-commits] [test-suite] r99511 - /test-suite/trunk/SingleSource/UnitTests/ObjC/dot-syntax-2.m
Daniel Dunbar
daniel at zuster.org
Thu Mar 25 09:01:55 PDT 2010
Author: ddunbar
Date: Thu Mar 25 11:01:55 2010
New Revision: 99511
URL: http://llvm.org/viewvc/llvm-project?rev=99511&view=rev
Log:
Add note on why Clang diverges from GCC on this test.
Modified:
test-suite/trunk/SingleSource/UnitTests/ObjC/dot-syntax-2.m
Modified: test-suite/trunk/SingleSource/UnitTests/ObjC/dot-syntax-2.m
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/dot-syntax-2.m?rev=99511&r1=99510&r2=99511&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/dot-syntax-2.m (original)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/dot-syntax-2.m Thu Mar 25 11:01:55 2010
@@ -11,7 +11,7 @@
@end
@implementation A
--(int) x {
+-(int) x {
return x + 2;
}
@@ -27,6 +27,9 @@
int res = (a.x += 1);
printf("res: %d\n", res);
+ // This is a case where clang diverges from gcc in Objective-C code
+ // generation. Clang correctly truncates the value in the this assignment to
+ // char, and extends, which is consistent with C semantics.
res = (a.y = 0xFFFF);
printf("res: %d\n", res);
More information about the llvm-commits
mailing list