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

error: invalid escape sequence (unrecognized character) in '.ascii' directive .ascii #24

Open
ashWhiteHat opened this issue Sep 22, 2019 · 0 comments

Comments

@ashWhiteHat
Copy link

Simply run make test

➜  9cc git:(master) ✗ make test
cc -Wall -std=c11 -g   -c -o gen_ir.o gen_ir.c
cc -Wall -std=c11 -g   -c -o gen_x86.o gen_x86.c
cc -Wall -std=c11 -g   -c -o irdump.o irdump.c
cc -Wall -std=c11 -g   -c -o liveness.o liveness.c
cc -Wall -std=c11 -g   -c -o main.o main.c
cc -Wall -std=c11 -g   -c -o opt.o opt.c
cc -Wall -std=c11 -g   -c -o parse.o parse.c
cc -Wall -std=c11 -g   -c -o preprocess.o preprocess.c
cc -Wall -std=c11 -g   -c -o regalloc.o regalloc.c
cc -Wall -std=c11 -g   -c -o sema.o sema.c
cc -Wall -std=c11 -g   -c -o token.o token.c
token.c:96:19: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  fprintf(stderr, msg);
                  ^~~
token.c:96:19: note: treat the string as an argument to avoid this
  fprintf(stderr, msg);
                  ^
                  "%s", 
token.c:107:9: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  error(msg);
        ^~~
token.c:107:9: note: treat the string as an argument to avoid this
  error(msg);
        ^
        "%s", 
2 warnings generated.
cc -Wall -std=c11 -g   -c -o util.o util.c
cc -Wall -std=c11 -g   -c -o util_test.o util_test.c
cc -o 9cc gen_ir.o gen_x86.o irdump.o liveness.o main.o opt.o parse.o preprocess.o regalloc.o sema.o token.o util.o util_test.o 
./9cc -test
tmp-test1.s:1318:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\0\'\000"
        ^
tmp-test1.s:1324:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\0\'\000"
        ^
tmp-test1.s:1330:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\00\'\000"
        ^
tmp-test1.s:1336:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\00\'\000"
        ^
tmp-test1.s:1342:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\000\'\000"
        ^
tmp-test1.s:1348:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\000\'\000"
        ^
tmp-test1.s:1354:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\1\'\000"
        ^
tmp-test1.s:1360:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\1\'\000"
        ^
tmp-test1.s:1366:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\7\'\000"
        ^
tmp-test1.s:1372:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\7\'\000"
        ^
tmp-test1.s:1378:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\100\'\000"
        ^
tmp-test1.s:1384:9: error: invalid escape sequence (unrecognized character) in '.ascii' directive
 .ascii "\'\\100\'\000"
        ^
make: *** [test] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant