[cfe-commits] [PATCH] PR8025 - Fix source location reporting for anonymous bitfields

Jakub Wieczorek fawek at fawek.net
Tue Nov 9 04:16:38 PST 2010


Thanks.

--- cfe/trunk/test/Sema/bitfield.c	2010/11/09 03:25:21	118480
+++ cfe/trunk/test/Sema/bitfield.c	2010/11/09 03:31:16	118481
@@ -34,3 +34,7 @@
 __typeof__((x.x+=1)+1) y;
 __typeof__(x.x<<1) y;
 int y;
+
+struct PR8025 {
+  double : 2; // expected-error{{anonymous bit-field has non-integral
type 'double'}}
+};

As far as I can say, this test case is not exactly testing the bug in
question, which was the missing location hint of the diagnostic (and I
was not sure how to write one that would). There's already a test case
in that file that's testing the diagnostic as such.

Best regards,
Jakub Wieczorek



More information about the cfe-commits mailing list