Bug 226068 - buildworld persistently fails due to how the keyword "auto" has been used in clang C++ code
Summary: buildworld persistently fails due to how the keyword "auto" has been used in ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.4-STABLE
Hardware: powerpc Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-02-20 16:03 UTC by jau
Modified: 2018-02-27 19:09 UTC (History)
1 user (show)

See Also:


Attachments
Patch SemaInit.cpp in clang source to use a proper type name instead of "auto". (672 bytes, patch)
2018-02-20 16:03 UTC, jau
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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