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:
|
case TFUNCTION:
|
||||||
{
|
{
|
||||||
fputs ("#<procedure ", fd);
|
fputs ("#<procedure ", fd);
|
||||||
#if __GNUC__
|
|
||||||
char const *p = "?";
|
char const *p = "?";
|
||||||
#else
|
|
||||||
char *p = "?";
|
|
||||||
#endif
|
|
||||||
if (FUNCTION (x).name != 0)
|
if (FUNCTION (x).name != 0)
|
||||||
p = FUNCTION (x).name;
|
p = FUNCTION (x).name;
|
||||||
fputs (p, fd);
|
fputs (p, fd);
|
||||||
|
|
|
@ -1257,7 +1257,7 @@
|
||||||
((accu->ident info) name)))))
|
((accu->ident info) name)))))
|
||||||
|
|
||||||
;; char *p = "t.c";
|
;; 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))
|
(when (not (.function info))
|
||||||
(stderr "o=~s\n" o)
|
(stderr "o=~s\n" o)
|
||||||
decl-barf3)
|
decl-barf3)
|
||||||
|
@ -1271,7 +1271,7 @@
|
||||||
((accu->ident info) name)))))
|
((accu->ident info) name)))))
|
||||||
|
|
||||||
;; char *p = 0;
|
;; 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)))
|
(let ((value (cstring->number value)))
|
||||||
(if (.function info)
|
(if (.function info)
|
||||||
(let* ((locals (add-local locals name type 1))
|
(let* ((locals (add-local locals name type 1))
|
||||||
|
|
2
posix.c
2
posix.c
|
@ -118,9 +118,7 @@ write_byte (SCM x) ///((arity . n))
|
||||||
char cc = VALUE (c);
|
char cc = VALUE (c);
|
||||||
write (1, (char*)&cc, fd);
|
write (1, (char*)&cc, fd);
|
||||||
#endif
|
#endif
|
||||||
#if __GNUC__
|
|
||||||
assert (TYPE (c) == TNUMBER || TYPE (c) == TCHAR);
|
assert (TYPE (c) == TNUMBER || TYPE (c) == TCHAR);
|
||||||
#endif
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue