Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WSymb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OTAWA-plugins
WSymb
Commits
4732be82
Commit
4732be82
authored
5 years ago
by
Forget Julien
Browse files
Options
Downloads
Patches
Plain Diff
Always print type cast before array initializer.
parent
235c4458
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
simplify/to_c.ml
+6
-6
6 additions, 6 deletions
simplify/to_c.ml
with
6 additions
and
6 deletions
simplify/to_c.ml
+
6
−
6
View file @
4732be82
...
...
@@ -4,12 +4,14 @@ open Wcet_formula
open
Context
open
Format
let
c_array
pp_elem
out_f
array
=
let
c_array
pp_elem
ty_string
out_f
array
=
let
length
=
List
.
length
array
in
if
length
=
0
then
pp_print_text
out_f
"NULL"
else
fprintf
out_f
"@[<hov 2>{%a}@]"
fprintf
out_f
"@[<hov 2>(%s[%d])@ {%a}@]"
ty_string
(
List
.
length
array
)
(
fun
out_f
->
pp_print_list
~
pp_sep
:
(
fun
out_f
()
->
fprintf
out_f
",@ "
)
...
...
@@ -47,7 +49,7 @@ let c_loopid out_f lid =
|
LTop
->
pp_print_string
out_f
"LOOP_TOP"
let
c_wlist
out_f
(
wl
,
last
)
=
fprintf
out_f
"%d,@ %a,@ %d"
(
List
.
length
wl
)
(
c_array
pp_print_int
)
wl
last
fprintf
out_f
"%d,@ %a,@ %d"
(
List
.
length
wl
)
(
c_array
pp_print_int
"long long"
)
wl
last
let
c_null_wcet
out_f
()
=
fprintf
out_f
"@[<hov 2>{-1,@ 0,@ NULL,@ 0}@]"
...
...
@@ -61,9 +63,7 @@ let c_annot out_f (lid, k) =
fprintf
out_f
".ann={%a,%d}"
c_loopid
lid
k
let
rec
c_formula_operands
out_f
fl
=
fprintf
out_f
"@[<hov 2>(formula_t[%d])@ %a@]"
(
List
.
length
fl
)
(
c_array
c_formula_rec
)
fl
c_array
c_formula_rec
"formula_t"
out_f
fl
and
c_formula_rec
out_f
f
=
fprintf
out_f
"@[<hov 2>{"
;
...
...
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