[clang] [clang] Alias cc modifier to c (PR #127719)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 13:47:32 PST 2025


petrhosek wrote:

> It seems like for gcc at least, IIUC, `cc` does a bit more than `c` so while we are supporting `cc` for compatibility we are not fully supporting it? Specifically:
> 
> `except try harder to print it with no punctuation`
> 
> Perhaps we should document that in the comment in `Stmt.cpp`, for gcc comparability but not totally equivalent?

In our testing, Clang's `c` was already trying harder than GCC's `c` and in all the example we tried Clang's `c` matched GCC's `cc`. Do you know of any case where Clang's `c` is not equivalent to GCC's `cc`? 

https://github.com/llvm/llvm-project/pull/127719


More information about the cfe-commits mailing list