Skip to content
Snippets Groups Projects
Commit dd92f0ff authored by Thibault Martin's avatar Thibault Martin
Browse files

[tests] Update a test to trigger a warning in doInit

parent 3e60ac4b
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,6 @@ struct signal tsig [3] = { 0.1, INVALID, 3, VALID };
void main() {
static unsigned char STR [] = { "123456" };
char ch[3] = "hello"; // Emit a warning
int i = STR[2];
}
......@@ -2,6 +2,7 @@
[kernel:parser:decimal-float] initializer.i:29: Warning:
Floating-point constant 0.1 is not represented exactly. Will use 0x1.999999999999ap-4.
(warn-once: no further messages from category 'parser:decimal-float' will be emitted)
[kernel] initializer.i:34: Warning: Too many initializers for character array ch
/* Generated by Frama-C */
enum bool {
INVALID = 0,
......@@ -57,6 +58,7 @@ static unsigned char main_STR[7] =
(unsigned char)'\000'};
void main(void)
{
char ch[3] = {(char)'h', (char)'e', (char)'l'};
int i = (int)main_STR[2];
return;
}
......
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