Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
dd92f0ff
Commit
dd92f0ff
authored
1 year ago
by
Thibault Martin
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Update a test to trigger a warning in doInit
parent
3e60ac4b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/syntax/initializer.i
+1
-1
1 addition, 1 deletion
tests/syntax/initializer.i
tests/syntax/oracle/initializer.res.oracle
+2
-0
2 additions, 0 deletions
tests/syntax/oracle/initializer.res.oracle
with
3 additions
and
1 deletion
tests/syntax/initializer.i
+
1
−
1
View file @
dd92f0ff
...
@@ -31,6 +31,6 @@ struct signal tsig [3] = { 0.1, INVALID, 3, VALID };
...
@@ -31,6 +31,6 @@ struct signal tsig [3] = { 0.1, INVALID, 3, VALID };
void
main
()
{
void
main
()
{
static unsigned char STR [] = { "123456" };
static unsigned char STR [] = { "123456" };
char ch[3] = "hello"; // Emit a warning
int i = STR[2];
int i = STR[2];
}
}
This diff is collapsed.
Click to expand it.
tests/syntax/oracle/initializer.res.oracle
+
2
−
0
View file @
dd92f0ff
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
[kernel:parser:decimal-float] initializer.i:29: Warning:
[kernel:parser:decimal-float] initializer.i:29: Warning:
Floating-point constant 0.1 is not represented exactly. Will use 0x1.999999999999ap-4.
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)
(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 */
/* Generated by Frama-C */
enum bool {
enum bool {
INVALID = 0,
INVALID = 0,
...
@@ -57,6 +58,7 @@ static unsigned char main_STR[7] =
...
@@ -57,6 +58,7 @@ static unsigned char main_STR[7] =
(unsigned char)'\000'};
(unsigned char)'\000'};
void main(void)
void main(void)
{
{
char ch[3] = {(char)'h', (char)'e', (char)'l'};
int i = (int)main_STR[2];
int i = (int)main_STR[2];
return;
return;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment