apply sources patch cc-cpp-c99-comm
When running "?c -p ...", ensure the backend cpp recognizes C++ comments. 2c(1) states that the compilers recognize // comments, and the bare compilers do. But if you invoke the compiler with '-p', the backend cpp process doesn't handle // comments properly unless you also give ?c the undocumented '-+' option (which it passes through to cpp).
This commit is contained in:
parent
87b66bade2
commit
76c102e548
|
@ -242,14 +242,12 @@ compile(char *file, char **defs, int ndef)
|
|||
close(fd[1]);
|
||||
av[0] = CPP;
|
||||
i = 1;
|
||||
sprint(opt, "-+");
|
||||
av[i++] = strdup(opt);
|
||||
if(debug['.']){
|
||||
sprint(opt, "-.");
|
||||
av[i++] = strdup(opt);
|
||||
}
|
||||
if(debug['+']) {
|
||||
sprint(opt, "-+");
|
||||
av[i++] = strdup(opt);
|
||||
}
|
||||
for(c = 0; c < ndef; c++) {
|
||||
sprint(opt, "-D%s", defs[c]);
|
||||
av[i++] = strdup(opt);
|
||||
|
|
Loading…
Reference in a new issue