mescc: Respect integer literal type suffixes.
* module/mescc/compile.scm (ast->type): Respect ULL, UL, U, LL, L suffix on integer literals.
This commit is contained in:
parent
8f67315eb6
commit
da03a384c8
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -116,7 +116,14 @@
|
|||
|
||||
((char ,value) (get-type "char" info))
|
||||
((enum-ref . _) (get-type "default" info))
|
||||
((fixed ,value) (get-type "default" info))
|
||||
((fixed ,value)
|
||||
(let ((type (cond ((string-suffix? "ULL"value) "unsigned long long")
|
||||
((string-suffix? "UL" value) "unsigned long")
|
||||
((string-suffix? "U" value) "unsigned")
|
||||
((string-suffix? "LL" value) "long long")
|
||||
((string-suffix? "L" value) "long")
|
||||
(else "default"))))
|
||||
(get-type type info)))
|
||||
((float ,float) (get-type "float" info))
|
||||
((void) (get-type "void" info))
|
||||
|
||||
|
|
Loading…
Reference in a new issue