aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/PrintCsyntax.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-05-22 11:13:23 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2015-05-22 11:13:23 +0200
commitef16a51223a4b73eed74c40ce9938248ab6b4b8a (patch)
tree12a81f7818a01eab08b71b253320c11ebb364447 /cfrontend/PrintCsyntax.ml
parent5dd1544021c608060d8ee5ba052cc82132fff741 (diff)
downloadcompcert-kvx-ef16a51223a4b73eed74c40ce9938248ab6b4b8a.tar.gz
compcert-kvx-ef16a51223a4b73eed74c40ce9938248ab6b4b8a.zip
In AST.calling_conventions, record whether the original C function was "old-style" unprototyped.
Use this info in printing function types for Csyntax and Clight.
Diffstat (limited to 'cfrontend/PrintCsyntax.ml')
-rw-r--r--cfrontend/PrintCsyntax.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml
index bde61cc7..d890c820 100644
--- a/cfrontend/PrintCsyntax.ml
+++ b/cfrontend/PrintCsyntax.ml
@@ -123,7 +123,7 @@ let rec name_cdecl id ty =
if not first then Buffer.add_string b ", ";
Buffer.add_string b (name_cdecl "" t1);
add_args false tl in
- add_args true args;
+ if not cconv.cc_unproto then add_args true args;
Buffer.add_char b ')';
name_cdecl (Buffer.contents b) res
| Tstruct(name, a) ->