Skip to content

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

@ashWhiteHat

Description

@ashWhiteHat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions