[#109095] [Ruby master Misc#18888] Migrate ruby-lang.org mail services to Google Domains and Google Workspace — "shugo (Shugo Maeda)" <noreply@...>
Issue #18888 has been reported by shugo (Shugo Maeda).
16 messages
2022/06/30
[ruby-core:108874] [Ruby master Bug#18823] _Bool not defined for C++
From:
"mame (Yusuke Endoh)" <noreply@...>
Date:
2022-06-13 14:12:24 UTC
List:
ruby-core #108874
Issue #18823 has been updated by mame (Yusuke Endoh). michals (Michal Such叩nek) wrote in #note-6: > include/ruby/internal/stdbool.h defines _Bool, and in most cases just uses bool defined by the runtime. No. C99 defines "_Bool" as an intrinsic type, and C's stdbool.h defines "bool" as an alias to "_Bool". See the specification of the C language and https://pubs.opengroup.org/onlinepubs/009696799/basedefs/stdbool.h.html . include/ruby/internal/stdbool.h attempts to define "bool" in C89, C99, and C++. C++ provides "bool" as an intrinsic type, so the header does almost nothing. BTW, I am a little baffled by a bug report like "ruby does not compile if I modify its source code". ---------------------------------------- Bug #18823: _Bool not defined for C++ https://bugs.ruby-lang.org/issues/18823#change-97955 * Author: michals (Michal Such叩nek) * Status: Rejected * Priority: Normal * ruby -v: ruby 3.2.0dev (2022-06-12T17:35:26Z master 8158f05e72) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- When a _Bool argument is added to rb_fd_select ruby cannot be compiled on VisualStudio 2022 VisualStudio 2019 gcc-5 gcc-4.8 clang-5 clang-4 clang-3.9 c++98 (llvm 14) c++2a (llvm 14) which suggests that `if defined(HAVE_STDBOOL_H) && (__cplusplus >= 201103L)` in `include/ruby/internal/stdbool.h` may not be a great way to detect that C++ has bool, especially on Visual Studio. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>