Date: Thu, 5 Apr 2018 17:50:01 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Pete Wright <pete@nomadlogic.org> Cc: Conrad Meyer <cem@freebsd.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: clang manual page? Message-ID: <20180406005001.GA43998@troutmask.apl.washington.edu> In-Reply-To: <347cc907-96b3-140d-5a8f-084f91283be5@nomadlogic.org> References: <20180405223852.GA43120@troutmask.apl.washington.edu> <CAG6CVpUpj7B6ujUSCUkznCBKSGKcuM2czZ=VBgKK%2Bkm5wFwfmg@mail.gmail.com> <20180406001514.GA43793@troutmask.apl.washington.edu> <347cc907-96b3-140d-5a8f-084f91283be5@nomadlogic.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 05, 2018 at 05:30:04PM -0700, Pete Wright wrote: > > > On 04/05/2018 17:15, Steve Kargl wrote: > > This assumes that a gcc(1) is available on the system. > > > > % man gcc > > No manual entry for gcc > > > > If the system compiler is clang/clang++, then it ought to be > > documented better than it currently is. Ian's suggests for > > 'clang --help' is even worse > > > > % clang --help | grep -- -std > > -cl-std=<value> OpenCL language standard to compile for. > > -std=<value> Language standard to compile for > > -stdlib=<value> C++ standard library to use > > > > Does <value> == <language>? > > > a quick google search turns up the following additional information: > > "clang supports the -std option, which changes what language mode clang > uses. The supported modes for C are c89, gnu89, c99, gnu99, c11, gnu11, > c17, gnu17, and various aliases for those modes. If no -std option is > specified, clang defaults to gnu11 mode. Many C99 and C11 features are > supported in earlier modes as a conforming extension, with a warning. > Use |-pedantic-errors| to request an error if a feature from a later > standard revision is used in an earlier mode." > > https://clang.llvm.org/docs/UsersManual.html > Yeah, I know how to use google. The above leaves out the clang++ -std=<language>, er, <value> values. One can guess at some of the <value> from https://clang.llvm.org/cxx_status.html. There is no mention of any of the gnu C++ <value>. I'll also note that the above list does include -std=iso9899:1990, which clang appears to accept (but does clang silently igonore the option like other GCC options). An option as fundamental as -std=<value> should be fully documented. A user should not have to resort to the almighty google to use the tools supplied by the system. -- Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180406005001.GA43998>