Summary: | sys-devel/gcc-config c99 wrapper should add -P flag | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hadrien Lacour <hadrien.lacour> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Hadrien Lacour
2022-11-07 18:23:56 UTC
(In reply to Hadrien Lacour from comment #0) > $ c99 -E hello.c >hello_.c > $ c99 hello_.c Why would you do that? This seems like a contrived example. Do you have a real example of a build system that pre-processes its source files explicitly before compiling them? My own build system, where in at least one case, I add my own preprocessing that I still want to interact "as expected" with #if and friends (https://git.sr.ht/~q3cpma/posix-build/tree/master/item/build_util.sh#L1345 for reference). What's the argument against, anyway? -E is specified by POSIX, and without -P, gcc produces non standard C (unless unknown directives are specified as ignored, I don't know). I suspect losing the line markers would make for less results when debugging. I'm not sure what else (if anything) it would break. s/less/less useful/ That said, I would guess that very few people actually use the "c99" command, so changing its behavior will have limited impact. Personally, I think that since the wrapper is just here to satisfy POSIX, conformance should be the first goal. |