Skip to content
Snippets Groups Projects
Commit 5b4b992b authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Kernel] add test with negative-width bitfield

parent 72ce0f64
No related branches found
No related tags found
No related merge requests found
[kernel] Parsing tests/syntax/struct_with_function_field_invalid.i (no preprocessing)
[kernel] tests/syntax/struct_with_function_field_invalid.i:8: User Error:
field `f' declared as a function
[kernel] User Error: stopping on file "tests/syntax/struct_with_function_field_invalid.i" that has
errors.
[kernel] Frama-C aborted: invalid user input.
[kernel] Parsing tests/syntax/struct_with_invalid_field.i (no preprocessing)
[kernel] tests/syntax/struct_with_invalid_field.i:8: User Error:
field `f' declared as a function
[kernel] tests/syntax/struct_with_invalid_field.i:14: User Error:
negative bitfield width (-1)
[kernel] tests/syntax/struct_with_invalid_field.i:15: User Error:
negative bitfield width (-2147483648)
[kernel] User Error: stopping on file "tests/syntax/struct_with_invalid_field.i" that has errors.
[kernel] Frama-C aborted: invalid user input.
......@@ -7,3 +7,11 @@
struct {
void f(int);
} s;
// negative-width bitfields, parsing should fail
struct neg_bf
{
int a:(-1); // invalid
int b:(-2147483647-1); // invalid
int d:(-0); // valid
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment