aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/PrintCsyntax.ml
diff options
context:
space:
mode:
authorSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2021-06-11 11:41:37 +0200
committerSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2021-06-11 11:41:37 +0200
commitaf16cdae6d58033cc8aa06bca330f98b96ba12f2 (patch)
tree4985e9ae8fa0d580bbf95a198edeca4f0bd6ff46 /cfrontend/PrintCsyntax.ml
parent21c979fce33b068ce4b86e67d3d866b203411c6c (diff)
parent02b169b444c435b8d1aacf54969dd7de57317a5c (diff)
downloadcompcert-kvx-af16cdae6d58033cc8aa06bca330f98b96ba12f2.tar.gz
compcert-kvx-af16cdae6d58033cc8aa06bca330f98b96ba12f2.zip
Merge branch 'BTL' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into BTL
Diffstat (limited to 'cfrontend/PrintCsyntax.ml')
-rw-r--r--cfrontend/PrintCsyntax.ml17
1 files changed, 9 insertions, 8 deletions
diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml
index cfb2b584..898a14b6 100644
--- a/cfrontend/PrintCsyntax.ml
+++ b/cfrontend/PrintCsyntax.ml
@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the GNU General Public License as published by *)
-(* the Free Software Foundation, either version 2 of the License, or *)
-(* (at your option) any later version. This file is also distributed *)
-(* under the terms of the INRIA Non-Commercial License Agreement. *)
+(* under the terms of the GNU Lesser General Public License as *)
+(* published by the Free Software Foundation, either version 2.1 of *)
+(* the License, or (at your option) any later version. *)
+(* This file is also distributed under the terms of the *)
+(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
@@ -112,8 +113,8 @@ let rec name_cdecl id ty =
| Tnil ->
if first then
Buffer.add_string b
- (if cconv.cc_vararg then "..." else "void")
- else if cconv.cc_vararg then
+ (if cconv.cc_vararg <> None then "..." else "void")
+ else if cconv.cc_vararg <> None then
Buffer.add_string b ", ..."
else
()
@@ -402,11 +403,11 @@ let name_function_parameters name_param fun_name params cconv =
Buffer.add_char b '(';
begin match params with
| [] ->
- Buffer.add_string b (if cconv.cc_vararg then "..." else "void")
+ Buffer.add_string b (if cconv.cc_vararg <> None then "..." else "void")
| _ ->
let rec add_params first = function
| [] ->
- if cconv.cc_vararg then Buffer.add_string b ",..."
+ if cconv.cc_vararg <> None then Buffer.add_string b ",..."
| (id, ty) :: rem ->
if not first then Buffer.add_string b ", ";
Buffer.add_string b (name_cdecl (name_param id) ty);