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
3175ea90
Commit
3175ea90
authored
5 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[printer] also protect empty ghost blocks inside non-ghost environment
parent
63ad701a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kernel_services/ast_printing/cil_printer.ml
+2
-2
2 additions, 2 deletions
src/kernel_services/ast_printing/cil_printer.ml
with
2 additions
and
2 deletions
src/kernel_services/ast_printing/cil_printer.ml
+
2
−
2
View file @
3175ea90
...
...
@@ -1215,6 +1215,8 @@ class cil_printer () = object (self)
gives us at least a correct, compilable, C code.
*)
|
_
::_::_,
[]
,
[]
,_
->
is_cfg_block
ctxt
|
[
s
]
,
[]
,
[]
,
(
Then_with_else
|
Other
)
when
(
not
is_ghost
)
&&
s
.
ghost
->
true
|
[
{
skind
=
Block
b
}
as
s'
]
,
[]
,
[]
,
Stmt_block
s
->
(
b
.
bscoping
||
(
not
(
Cil
.
has_extern_local_init
b
)
&&
self
#
stmt_has_annot
s
))
...
...
@@ -1225,8 +1227,6 @@ class cil_printer () = object (self)
|
[
{
skind
=
Block
b
}
]
,
[]
,
[]
,
_
->
self
#
require_braces
ctxt
b
|
[
{
skind
=
UnspecifiedSequence
s
}
]
,
[]
,
[]
,
_
->
self
#
require_braces
ctxt
(
Cil
.
block_from_unspecified_sequence
s
)
|
[
s
]
,
[]
,
[]
,
(
Then_with_else
|
Other
)
when
(
not
is_ghost
)
&&
s
.
ghost
->
true
|
[
_
]
,
[]
,
[]
,
Then_with_else
->
self
#
block_has_dangling_else
blk
|
[
_
]
,
[]
,
[]
,
_
->
false
|
[]
,
[]
,
[]
,_
->
false
)
...
...
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