From 50af730e006ef49acaa1c2d6334ebb006d5e9159 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 4 Aug 2017 11:45:15 +0200 Subject: [PATCH] Revert "mescc: Tinycc support: workaround for nyacc "\0" bug." This reverts commit b160540e221dbeb96908823b5a3504bdbfd7f751. Fixed by: https://lists.gnu.org/archive/html/guile-user/2017-08/msg00007.html --- module/language/c99/compiler.mes | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/module/language/c99/compiler.mes b/module/language/c99/compiler.mes index 0928f469..6a6c4d8e 100644 --- a/module/language/c99/compiler.mes +++ b/module/language/c99/compiler.mes @@ -2431,15 +2431,12 @@ ((p-expr (fixed ,value)) (cstring->number value)) (_ (error "initzer->value: " o))))) -(define (fix-null o) - (if (equal? o "\nul") (make-string 1 #\nul) o)) - (define (initzer->data info) (lambda (o) (pmatch o ((initzer (p-expr (char ,char))) (int->bv32 (char->integer (string-ref char 0)))) ((initzer (p-expr (string ,string))) `((#:string ,string) #f #f #f)) - ((initzer (p-expr (string . ,strings))) `((#:string ,(string-join (map fix-null strings) "")) #f #f #f)) + ((initzer (p-expr (string . ,strings))) `((#:string ,(string-join strings "")) #f #f #f)) ((initzer (initzer-list . ,initzers)) (append-map (initzer->data info) initzers)) ((initzer (ref-to (p-expr (ident ,name)))) `(,name #f #f #f)) ((initzer (ref-to (i-sel (ident ,field) (cast (type-name (decl-spec-list ,struct) (abs-declr (pointer))) (p-expr (fixed ,base)))))) @@ -2469,7 +2466,7 @@ (or (assoc g globals) (string->global-entry string)))) ((p-expr (string . ,strings)) - (let* ((string (string-join (map fix-null strings) "")) + (let* ((string (string-join strings "")) (g `(#:string ,string))) (or (assoc g globals) (string->global-entry string))))