"expected selector for Objective-C %select{setter|getter}0">;
def err_objc_property_requires_field_name : Error<
"property requires fields to be named">;
-def err_objc_property_bitfield : Error<"property name cannot be a bitfield">;
+def err_objc_property_bitfield : Error<"property name cannot be a bit-field">;
def err_objc_expected_property_attr : Error<"unknown property attribute %0">;
def err_objc_properties_require_objc2 : Error<
"properties are an Objective-C 2 feature">;
"in-class initialization of non-static data members is incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
def err_bitfield_member_init: Error<
- "bitfield member cannot have an in-class initializer">;
+ "bit-field member cannot have an in-class initializer">;
def err_incomplete_array_member_init: Error<
"array bound cannot be deduced from an in-class initializer">;
"implicit conversion from %2 to %3 changes value from %0 to %1">,
InGroup<ConstantConversion>;
def warn_impcast_bitfield_precision_constant : Warning<
- "implicit truncation from %2 to bitfield changes value from %0 to %1">,
+ "implicit truncation from %2 to bit-field changes value from %0 to %1">,
InGroup<BitFieldConstantConversion>;
def warn_impcast_literal_float_to_integer : Warning<
def err_static_function_scope : Error<
"variables in function scope cannot be declared static">;
def err_opencl_bitfields : Error<
- "bitfields are not supported in OpenCL">;
+ "bit-fields are not supported in OpenCL">;
def err_opencl_vla : Error<
"variable length arrays are not supported in OpenCL">;
def err_bad_kernel_param_type : Error<
void test_7809123(void) {
struct { int i5 : 5; } a;
- a.i5 = 36; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 36 to 4}}
+ a.i5 = 36; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 36 to 4}}
}
void test() {
int bar : 2;
};
- struct A a = { 0, 10 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to -2}}
- struct A b[] = { 0, 10, 0, 0 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to -2}}
- struct A c[] = {{10, 0}}; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}}
- struct A d = (struct A) { 10, 0 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}}
- struct A e = { .foo = 10 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}}
+ struct A a = { 0, 10 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to -2}}
+ struct A b[] = { 0, 10, 0, 0 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to -2}}
+ struct A c[] = {{10, 0}}; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}}
+ struct A d = (struct A) { 10, 0 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}}
+ struct A e = { .foo = 10 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}}
}
void test4() {
char c : 2;
} a;
- a.c = 0x101; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 257 to 1}}
+ a.c = 0x101; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 257 to 1}}
}
void test5() {
} a;
// Don't warn about this implicit conversion to bool, or at least
- // don't warn about it just because it's a bitfield.
+ // don't warn about it just because it's a bit-field.
a.b = 100;
}
f.twoBits1 = ~0; // no-warning
f.twoBits1 = ~1; // no-warning
- f.twoBits2 = ~2; // expected-warning {{implicit truncation from 'int' to bitfield changes value from -3 to 1}}
+ f.twoBits2 = ~2; // expected-warning {{implicit truncation from 'int' to bit-field changes value from -3 to 1}}
f.twoBits1 &= ~1; // no-warning
f.twoBits2 &= ~2; // no-warning
}
void test8() {
enum E { A, B, C };
struct { enum E x : 1; } f;
- f.x = C; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 2 to 0}}
+ f.x = C; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 2 to 0}}
}
void test9() {
s.a = ~0U;
s.a = ~(1<<A);
- s.a = -9; // expected-warning{{implicit truncation from 'int' to bitfield changes value from -9 to 7}}
- s.a = 16; // expected-warning{{implicit truncation from 'int' to bitfield changes value from 16 to 0}}
+ s.a = -9; // expected-warning{{implicit truncation from 'int' to bit-field changes value from -9 to 7}}
+ s.a = 16; // expected-warning{{implicit truncation from 'int' to bit-field changes value from 16 to 0}}
}