<div dir="ltr">Maybe GCC sees a declaration of `clang::Stmt` without the attribute before it sees the definition? I know GCC is a lot more picky about the order in which it sees attributes.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 7, 2016 at 4:23 PM, Richard Smith via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Wed, Sep 7, 2016 at 3:17 PM, Renato Golin via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Clang folks,<br>
<br>
FYI, I'm getting a lot of warnings from GCC 6.1.1 when building Clang...<br>
<br>
Haven't had time to look closer and probably won't this week, so if<br>
anyone would like to have a go... :)<br>
<br>
<br>
include/llvm/Support/Casting.h<wbr>:183:72: warning: ignoring attributes on<br>
template argument 'llvm::simplify_type<const clang::Stmt*<br>
const>::SimpleType {aka const clang::Stmt*}' [-Wignored-attributes]<br></blockquote><div><br></div></span><div>GCC seems confused. There are no attributes here. Perhaps it's confused because clang::Stmt itself has an alignment attribute on its definition?</div><div><div class="h5"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
include/llvm/Support/Casting.h<wbr>: In instantiation of 'struct<br>
llvm::cast_retty<clang::Implic<wbr>itCastExpr, const clang::Stmt* const>':<br>
<br>
include/llvm/Support/Casting.h<wbr>:222:1: required by substitution of<br>
'template<class X, class Y> typename std::enable_if<(!<br>
llvm::is_simple_type<Y>::value<wbr>), typename llvm::cast_retty<X, const<br>
Y>::ret_type>::type llvm::cast(const Y&) [with X =<br>
clang::ImplicitCastExpr; Y = const clang::Stmt*]'<br>
<br>
tools/clang/include/clang/AST/<wbr>ASTTypeTraits.h:383:22: required from<br>
'static const T&<br>
clang::ast_type_traits::DynTyp<wbr>edNode::DynCastPtrConverter<T,<br>
BaseT>::getUnchecked(clang::as<wbr>t_type_traits::ASTNodeKind, const char*)<br>
[with T = clang::ImplicitCastExpr; BaseT = clang::Stmt]'<br>
<br>
tools/clang/include/clang/AST/<wbr>ASTTypeTraits.h:242:42: required from<br>
'const T& clang::ast_type_traits::DynTyp<wbr>edNode::getUnchecked() const<br>
[with T = clang::ImplicitCastExpr]'<br>
<br>
tools/clang/include/clang/ASTM<wbr>atchers/ASTMatchersInternal.h:<wbr>283:19:<br>
required from 'bool<br>
clang::ast_matchers::internal:<wbr>:MatcherInterface<T>::dynMatch<wbr>es(const<br>
clang::ast_type_traits::DynTyp<wbr>edNode&,<br>
clang::ast_matchers::internal:<wbr>:ASTMatchFinder*,<br>
clang::ast_matchers::internal:<wbr>:BoundNodesTreeBuilder*) const [with T =<br>
clang::ImplicitCastExpr]'<br>
<br>
tools/clang/unittests/ASTMatch<wbr>ers/ASTMatchersNarrowingTest.<wbr>cpp:1957:1:<br>
required from here<br>
<br>
include/llvm/Support/Casting.h<wbr>:134:74: warning: ignoring attributes on<br>
template argument 'llvm::simplify_type<const clang::Stmt*<br>
const>::SimpleType {aka const clang::Stmt*}' [-Wignored-attributes]<br>
return isa_impl_wrap<X, const Y,<br>
~~~~~~~~~~~~~~~~~~~~~~~~~<br>
typename simplify_type<const Y>::SimpleType>::doit(Val);<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~^~~~~<br>
<br>
etc.<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div></div><br></div></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>