[cfe-dev] clang(1) 3.4 manpage documentation is sparse; need help figuring out available options in compiler

Garrett Cooper yaneurabeya at gmail.com
Fri Dec 5 03:24:15 PST 2014


On Dec 5, 2014, at 2:37, Nikola Smiljanic <popizdeh at gmail.com> wrote:

> I don't think so (apart from the webpages), but clang is meant to be a drop in replacement for gcc. Can you be a bit more specific with the issue you're having?

Hi Nikola,
	The problem is that as a FreeBSD/OSX end-user, have no idea what is and isn’t supported with clang from a command line perspective, apart from what’s listed in man 1 clang (which isn’t much: https://www.freebsd.org/cgi/man.cgi?query=clang&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html ). Many of the C/C++ warnings are missing from the manpage, optimization flags aren’t noted (-march/-mcpu, etc), etc. I realize that man 1 gcc consists of a lot of outdated information, but the bulk majority of the information is presented in man 1 gcc/man 1 g++. In my case, I was trying to figure out what preprocessor options are available via clang (in order to turn off undefined/unsupported preprocessor #defines, if such a thing existed), but I didn’t find anything helpful in man 1 clang and I didn’t have the patience to look through /usr/src/contrib/llvm for the command-line options to achieve what I needed. Furthermore, if there is any language-specific documentation, it’s not linked from within man 1 clang.
	Documentation webpages don’t seem to elucidate me either: https://www.google.com/search?client=safari&rls=en&q=clang+warnings+list&ie=UTF-8&oe=UTF-8.
	Other folks have complained about the lack of manpage documentation on StackOverflow as well: http://stackoverflow.com/questions/7880812/complete-list-of-clang-flags .
	I love clang as a compiler, but I miss the documentation I had with gcc. If someone could fill in those blanks, I would appreciate clang a lot more.
Thank you!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141205/79a10743/attachment.sig>


More information about the cfe-dev mailing list