Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing file name sanitization in backends C and OCaml #325

Closed
2 tasks
andreasabel opened this issue Nov 15, 2020 · 0 comments
Closed
2 tasks

Missing file name sanitization in backends C and OCaml #325

andreasabel opened this issue Nov 15, 2020 · 0 comments
Assignees
Milestone

Comments

@andreasabel
Copy link
Member

Using a file name like 1-foo-Bar2.cf breakes some backends:

  • C
gcc -g --ansi -W -Wall -Wno-unused-parameter -Wno-unused-function -Wno-unneeded-internal-declaration -D_POSIX_C_SOURCE=200809L  -c Lexer.c
Lexer.c:181:18: error: expected identifier or '('
extern yy_size_t 1-foo-Bar2leng;
                 ^
Lexer.c:183:14: error: expected identifier or '('
extern FILE *1-foo-Bar2in, *1-foo-Bar2out;
             ^
...
  • Ocaml
File "Abs1-foo-Bar2.ml", line 1:
Warning 24: bad source file name: "Abs1-foo-Bar2" is not a valid module name.
File "Skel1-foo-Bar2.ml", line 1:
Warning 24: bad source file name: "Skel1-foo-Bar2" is not a valid module name.
File "Skel1-foo-Bar2.ml", line 1, characters 12-13:
1 | module Skel1-foo-Bar2 = struct
                ^
Error: Syntax error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant