qiongsiwu wrote:

Thanks for chiming in and describing your concern @AaronBallman ! 

We think this feature should be in the community clang for the following 
reasons. 

1. It is useful for a community `clang` user on AIX to be aware of uses of 
`#pragma mc_func` in their code. The community `clang` does not support`#pragma 
mc_func`, and the pragma should not be used in any situations in user code. 
Since `#pragma mc_func` defines code that could be executed, silently ignoring 
them is not an ideal behaviour. `-Werror=unknown-pragmas` can be used, but 
there could be many such errors that drown out the errors on `#pragma mc_func`. 
Reporting `#pragma mc_func` as an error all the time is unfortunately not ideal 
either. Some AIX system headers still contain `#pragma mc_func`, so we provide 
the users an option to turn off the error detection if that is the user's 
intention. The flip side is that if a user does include such a header, they 
will be aware that their code does not work and does not have to debug further. 
We have already implemented this check downstream. 
2. The change has limited impact on other platforms. 

If the implementation is too heavy, I am all ears for a different way to 
implement this check. 

https://github.com/llvm/llvm-project/pull/99888
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to