write a #line file name as a C string literal
It was pasted between quotes as it came, so a quote in the path ended it, a backslash began an escape, and ?? read as a trigraph.
This commit is contained in:
@@ -45,8 +45,9 @@
|
||||
|
||||
(define (line-directive src)
|
||||
;; `%line' is fmt-c's #line directive. cpp-line concatenates its
|
||||
;; second argument verbatim, so the file name arrives already quoted.
|
||||
`(%line ,(cadr src) ,(fmt #f #\" (car src) #\")))
|
||||
;; second argument verbatim, so the file name arrives as the string
|
||||
;; literal C reads it as: a quote, a backslash or a ?? in it escaped.
|
||||
`(%line ,(cadr src) ,(fmt #f (c-in-expr (c-literal (car src))))))
|
||||
|
||||
(define (walk-body stmts)
|
||||
"Walk a statement list, re-anchoring each statement that has a known
|
||||
|
||||
Reference in New Issue
Block a user