Skip to content

Commit 8880846

Browse files
author
casse
committed
Added GNU_INLINE.
1 parent 07a07b3 commit 8880846

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

frontc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ include ../Makefile.head
44
SOURCES = \
55
cabs.ml \
66
cxml.ml \
7+
cprint.ml \
78
clexer.mll \
89
cparser.mly \
910
ctoxml.ml \
10-
cprint.ml \
1111
frontc.ml
1212

1313
$(eval $(call ocaml_lib,frontc,$(SOURCES)))

frontc/cprint.ml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ and print_pointer typ =
254254
| CONST typ -> print_pointer typ; print " const "
255255
| VOLATILE typ -> print_pointer typ; print " volatile "
256256
| ARRAY (typ, _) -> print_pointer typ
257-
| _ -> ()
257+
| _ -> print_base_type typ
258258

259259
and print_array typ =
260260
match typ with
@@ -265,6 +265,10 @@ and print_array typ =
265265
print "]"
266266
| _ -> ()
267267

268+
(** Print a type.
269+
@param fct Function called to display the name of the.
270+
@param typ Type to display.
271+
*)
268272
and print_type (fct : unit -> unit) (typ : base_type ) =
269273
let base = get_base_type typ in
270274
match base with
@@ -695,6 +699,8 @@ and print_attribute attr =
695699
print_constant cst
696700
| GNU_EXTENSION ->
697701
print "__extension__"
702+
| GNU_INLINE ->
703+
print "__inline__"
698704

699705

700706
(*

frontc/ctoxml.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ and convert_gnu_attr attr =
306306
-> convert_const cst
307307
| GNU_EXTENSION
308308
-> Cxml.new_elt "extension" [] []
309+
| GNU_INLINE
310+
-> Cxml.new_elt "inline" [] []
309311
| GNU_CALL (id, attrs)
310312
-> Cxml.new_elt "call" [("id", id)] (List.map convert_gnu_attr attrs)
311313

0 commit comments

Comments
 (0)