mescc: Allow usage of const by ignoring.
* module/language/c99/compiler.mes (ast->info): Support const declarations (by ignoring them). * lib.c (display_helper)[!__GNUC__]: Remove branch. * posix.c (write_byte)[!__GNUC__]: Likewise.
This commit is contained in:
parent
d7797ad2cf
commit
c4b14d66d3
4
lib.c
4
lib.c
|
@ -86,11 +86,7 @@ display_helper (SCM x, int cont, char* sep, int fd)
|
|||
case TFUNCTION:
|
||||
{
|
||||
fputs ("#<procedure ", fd);
|
||||
#if __GNUC__
|
||||
char const *p = "?";
|
||||
#else
|
||||
char *p = "?";
|
||||
#endif
|
||||
if (FUNCTION (x).name != 0)
|
||||
p = FUNCTION (x).name;
|
||||
fputs (p, fd);
|
||||
|
|
|
@ -1257,7 +1257,7 @@
|
|||
((accu->ident info) name)))))
|
||||
|
||||
;; char *p = "t.c";
|
||||
((decl (decl-spec-list (type-spec (fixed-type ,type))) (init-declr-list (init-declr (ptr-declr (pointer) (ident ,name)) (initzer (p-expr (string ,string))))))
|
||||
((decl (decl-spec-list (type-spec (fixed-type ,type)) . _) (init-declr-list (init-declr (ptr-declr (pointer) (ident ,name)) (initzer (p-expr (string ,string))))))
|
||||
(when (not (.function info))
|
||||
(stderr "o=~s\n" o)
|
||||
decl-barf3)
|
||||
|
@ -1271,7 +1271,7 @@
|
|||
((accu->ident info) name)))))
|
||||
|
||||
;; char *p = 0;
|
||||
((decl (decl-spec-list (type-spec (fixed-type ,type))) (init-declr-list (init-declr (ptr-declr (pointer) (ident ,name)) (initzer (p-expr (fixed ,value))))))
|
||||
((decl (decl-spec-list (type-spec (fixed-type ,type)) . _) (init-declr-list (init-declr (ptr-declr (pointer) (ident ,name)) (initzer (p-expr (fixed ,value))))))
|
||||
(let ((value (cstring->number value)))
|
||||
(if (.function info)
|
||||
(let* ((locals (add-local locals name type 1))
|
||||
|
|
Loading…
Reference in a new issue