From owner-freebsd-current@freebsd.org Fri Apr 6 00:50:04 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4416F90B07 for ; Fri, 6 Apr 2018 00:50:03 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 716777A636; Fri, 6 Apr 2018 00:50:03 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id w360o1os044109 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 5 Apr 2018 17:50:01 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id w360o1hp044108; Thu, 5 Apr 2018 17:50:01 -0700 (PDT) (envelope-from sgk) Date: Thu, 5 Apr 2018 17:50:01 -0700 From: Steve Kargl To: Pete Wright Cc: Conrad Meyer , freebsd-current Subject: Re: clang manual page? Message-ID: <20180406005001.GA43998@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20180405223852.GA43120@troutmask.apl.washington.edu> <20180406001514.GA43793@troutmask.apl.washington.edu> <347cc907-96b3-140d-5a8f-084f91283be5@nomadlogic.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <347cc907-96b3-140d-5a8f-084f91283be5@nomadlogic.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 00:50:04 -0000 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= OpenCL language standard to compile for. > > -std= Language standard to compile for > > -stdlib= C++ standard library to use > > > > Does == ? > > > 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=, er, values. One can guess at some of the from https://clang.llvm.org/cxx_status.html. There is no mention of any of the gnu C++ . 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= should be fully documented. A user should not have to resort to the almighty google to use the tools supplied by the system. -- Steve