svn commit: r303188 - head/share/mk

Bruce Evans brde at optusnet.com.au
Sat Jul 23 00:26:00 UTC 2016


On Fri, 22 Jul 2016, Ngie Cooper wrote:

> On Fri, Jul 22, 2016 at 2:57 PM, Bruce Evans <brde at optusnet.com.au> wrote:
> ...
>>>> +# GCC 6.1.0
>>>> +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100
>>>> +CWARNFLAGS+=   -Wno-error=unused-const-variable=
>>>> -Wno-error=nonnull-compare -Wno-error=shift-negative-value
>>>> -Wno-error=misleading-indentation -Wno-error=tautological-compare
>>>> +.endif
>>>
>>>
>>> Extra trailing = in the first one as well?
>>
>> I don't see one.  I see only unreadably long lines containing unreadably
>> unordered flags.  Perhaps your mail client mangled the line splitting,
>> but the above quite displays OK in mutt and vi here (except mutt makes
>> the line wrapping especially ugly by highlighting it).
>
> Look for "-Wno-error=unused-const-variable=".

It is not trailing :-).  It is only trailing in the above quote and
apparently in the mail as seen by jhb because some mail programs mangle
the formatting worse than others.  In the above quote as seen by me
in EDITOR=vi, the long line is split and each part is quoted.  But in
the previous quote, the line wasn't split.  Since it was unreadable
by me, I used the editor search function to check if it had a trailing
'=' using a regexp, and none was found.

The corresponding line for gcc 5.2.0 in bsd.sys.mk has the same quality.

The '='s in the correct part of the syntax are not very good either.  I
think they break our policy that all warnings are fatal unless NO_WERROR
is set.  Already clang allows too many things to compile without even
warnings.  I think this allows them to compile with gcc's stricter
warnings, but only with newer gcc's.  NO_WERROR is too global, but is
at least easy to understand.

Bruce


More information about the svn-src-all mailing list