From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 281DC38877E1; Wed, 8 Jun 2022 12:23:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 281DC38877E1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1056 #1057 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: eef1ee2638c73e35cc804c2d4ab42598dccea8ac X-Git-Newrev: 90f938c2ecefbf16b4793a4135531ed5394a52ac Message-Id: <20220608122309.281DC38877E1@sourceware.org> Date: Wed, 8 Jun 2022 12:23:09 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 12:23:09 -0000 https://gcc.gnu.org/g:90f938c2ecefbf16b4793a4135531ed5394a52ac commit 90f938c2ecefbf16b4793a4135531ed5394a52ac Merge: eef1ee2638c 85ffe83ad7b 7af3505c973 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Wed Mar 23 21:07:53 2022 +0000 Merge #1056 #1057 1056: Fix '#include ' [#159] r=tschwinge a=tschwinge ... recently introduced in #1044 commit 35ca685200830626e5abd623f65a850649beace2 "macros: Add base functions to check for follow-set ambiguities". GCC doesn't like that: In file included from [...] ./mm_malloc.h:42:12: error: attempt to use poisoned "malloc" return malloc (__size); ^ See commit e7b3f654f2ab0400c95c0517387a9ad645a5c4cd, for example. 1057: For use as 'std::unordered_map' key, provide 'std::hash' for 'Rust::AST::MacroFragSpec::Kind' enum class r=tschwinge a=tschwinge ... recently introduced in #1044 commit 35ca685200830626e5abd623f65a850649beace2 "macros: Add base functions to check for follow-set ambiguities". Otherwise, at least with an oldish GCC 5.2, compilation of 'gcc/rust/parse/rust-parse.cc' fails noisily: In file included from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/hashtable.h:35:0, from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/unordered_map:47, from [GCC/Rust]/gcc/rust/rust-system.h:46, from [GCC/Rust]/gcc/rust/rust-linemap.h:12, from [GCC/Rust]/gcc/rust/lex/rust-lex.h:22, from [GCC/Rust]/gcc/rust/parse/rust-parse.h:20, from [GCC/Rust]/gcc/rust/parse/rust-parse.cc:17: [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/hashtable_policy.h: In instantiation of 'struct std::__detail::__is_noexcept_hash >': [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/type_traits:137:12: required from 'struct std::__and_ >, std::__detail::__is_noexcept_hash > >' [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/type_traits:148:38: required from 'struct std::__not_ >, std::__detail::__is_noexcept_hash > > >' [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:100:66: required from 'class std::unordered_map >' [GCC/Rust]/gcc/rust/parse/rust-parse.cc:101:5: required from here [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/hashtable_policy.h:85:34: error: no match for call to '(const std::hash) (const Rust::AST::MacroFragSpec::Kind&)' noexcept(declval()(declval()))> ^ In file included from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/move.h:57:0, from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/stl_pair.h:59, from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/stl_algobase.h:64, from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/char_traits.h:39, from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/string:40, from [GCC/Rust]/gcc/rust/rust-system.h:34, from [GCC/Rust]/gcc/rust/rust-linemap.h:12, from [GCC/Rust]/gcc/rust/lex/rust-lex.h:22, from [GCC/Rust]/gcc/rust/parse/rust-parse.h:20, from [GCC/Rust]/gcc/rust/parse/rust-parse.cc:17: [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/type_traits: In instantiation of 'struct std::__not_ >, std::__detail::__is_noexcept_hash > > >': [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:100:66: required from 'class std::unordered_map >' [GCC/Rust]/gcc/rust/parse/rust-parse.cc:101:5: required from here [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/type_traits:148:38: error: 'value' is not a member of 'std::__and_ >, std::__detail::__is_noexcept_hash > >' : public integral_constant ^ In file included from [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/unordered_map:48:0, from [GCC/Rust]/gcc/rust/rust-system.h:46, from [GCC/Rust]/gcc/rust/rust-linemap.h:12, from [GCC/Rust]/gcc/rust/lex/rust-lex.h:22, from [GCC/Rust]/gcc/rust/parse/rust-parse.h:20, from [GCC/Rust]/gcc/rust/parse/rust-parse.cc:17: [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h: In instantiation of 'class std::unordered_map >': [GCC/Rust]/gcc/rust/parse/rust-parse.cc:101:5: required from here [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:100:66: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:107:45: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::key_type key_type; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:108:47: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::value_type value_type; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:109:48: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::mapped_type mapped_type; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:110:43: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::hasher hasher; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:111:46: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::key_equal key_equal; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:112:51: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::allocator_type allocator_type; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:117:45: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::pointer pointer; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:118:50: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::const_pointer const_pointer; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:119:47: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::reference reference; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:120:52: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::const_reference const_reference; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:121:46: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::iterator iterator; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:122:51: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::const_iterator const_iterator; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:123:51: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::local_iterator local_iterator; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:124:57: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::const_local_iterator const_local_iterator; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:125:47: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::size_type size_type; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:126:52: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' typedef typename _Hashtable::difference_type difference_type; ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:280:7: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' operator=(initializer_list __l) ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:379:2: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' emplace(_Args&&... __args) ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:432:7: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' insert(const value_type& __x) ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:439:2: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' insert(_Pair&& __x) ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:499:7: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' insert(initializer_list __l) ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:645:7: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' equal_range(const key_type& __x) ^ [GCC]/i686-pc-linux-gnu/include/c++/5.2.0/bits/unordered_map.h:649:7: error: 'value' is not a member of 'std::__not_ >, std::__detail::__is_noexcept_hash > > >' equal_range(const key_type& __x) const ^ [GCC/Rust]/gcc/rust/parse/rust-parse.cc: In function 'bool Rust::peculiar_fragment_match_compatible(Rust::AST::MacroMatchFragment&, Rust::AST::MacroMatch&)': [GCC/Rust]/gcc/rust/parse/rust-parse.cc:104:5: error: too many initializers for 'std::unordered_map >' }; ^ [GCC/Rust]/gcc/rust/parse/rust-parse.cc:119:16: error: no match for 'operator[]' (operand types are 'std::unordered_map >' and 'Rust::AST::MacroFragSpec::Kind') = follow_set[last_match.get_frag_spec ().get_kind ()]; ^ make[2]: *** [[GCC/Rust]/gcc/rust/Make-lang.in:299: rust/rust-parse.o] Error 1 Co-authored-by: Thomas Schwinge Diff: gcc/rust/ast/rust-macro.h | 11 +++++++++++ gcc/rust/parse/rust-parse-impl.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)