Bug 226068

Summary: buildworld persistently fails due to how the keyword "auto" has been used in clang C++ code
Product: Base System Reporter: jau
Component: binAssignee: Dimitry Andric <dim>
Status: Closed FIXED    
Severity: Affects Some People CC: dim
Priority: --- Keywords: patch
Version: 10.4-STABLE   
Hardware: powerpc   
OS: Any   
Attachments:
Description Flags
Patch SemaInit.cpp in clang source to use a proper type name instead of "auto". none

Description jau 2018-02-20 16:03:47 UTC
Created attachment 190830 [details]
Patch SemaInit.cpp in clang source to use a proper type name instead of "auto".

An auto pointer variable declaration within an if statement fails repeatedly.
It seems at least older C++ versions require a proper type name instead of
plain "auto".
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2018-02-27 18:18:14 UTC
Yeah, this is obviously an issue if the system compiler is still gcc 4.2.1, sorry about that.  I did a bunch of buildworlds before committing, but not a full universe.  I will have a look.
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2018-02-27 19:09:42 UTC
A commit references this bug:

Author: dim
Date: Tue Feb 27 19:02:50 UTC 2018
New revision: 330080
URL: https://svnweb.freebsd.org/changeset/base/330080

Log:
 Avoid using the C++11 auto keyword, which was introduced in r328555, as
 part of an upstream change.  This is not supported by gcc 4.2.1, which
 is still the default system compiler for some architectures.

 Direct commit to stable/9 and stable/10, since this does not apply to
 stable/11 and head.

 Reported by:  jau@iki.fi
 PR:           202665,226068

Changes:
 stable/10/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp
 stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp