Re: [PATCH] c++, v2: Allow indeterminate unsigned char or std::byte in bit_cast - P1272R4

2021-12-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Dec 03, 2021 at 01:56:56PM -0500, Jason Merrill wrote: > Ah, of course. The patch is OK, though you might factor > > > + else if (is_byte_access_type (type) > > + && TYPE_MAIN_VARIANT (type) != char_type_node) > > into is_byte_access_type_not_plain_char. OK either way. Th

[committed] i386, ipa-modref: Comment spelling fix

2021-12-04 Thread Jakub Jelinek via Gcc-patches
Hi! This patch fixes spelling of prefer (misspelled as preffer). 2021-12-04 Jakub Jelinek * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY): Fix comment typo, Preffer -> prefer. * ipa-modref-tree.c (modref_access_node::closer_pair_p): Likewise. --- gcc/conf

[committed] libstdc++: Initialize member in std::match_results [PR103549]

2021-12-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. This fixes a -Wuninitialized warning for std::cmatch m1, m2; m1=m2; Also name the template parameters in the forward declaration, to get rid of the noise in diagnostics. libstdc++-v3/ChangeLog: PR libstdc++/103549 * include/bits/regex

Re: [PATCH] c++: error message for dependent template members [PR70417]

2021-12-04 Thread Anthony Sharp via Gcc-patches
Hi Jason, Hope you are well. Apologies for not coming back sooner. >I'd put it just above the definition of saved_token_sentinel in parser.c. Sounds good, done. >Maybe cp_parser_require_end_of_template_parameter_list? Either way is fine. Even better, have changed it. >Hmm, good point; operat

[PATCH] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2021-12-04 Thread Lewis Hyatt via Gcc-patches
Hello- As discussed on PR c++/53431, currently "#pragma GCC diagnostic" does not always take effect for diagnostics generated by libcpp. The reason is that libcpp itself does not interpret this pragma and only sends it on to the frontend, hence the pragma is only honored if the frontend arranges f

[PATCH] c++: Fix for decltype and bit-fields [PR95009]

2021-12-04 Thread Marek Polacek via Gcc-patches
Here, decltype deduces the wrong type for certain expressions involving bit-fields. Unlike in C, in C++ bit-field width is explicitly not part of the type, so I think decltype should never deduce to 'int:N'. The problem isn't that we're not calling unlowered_expr_type--we are--it's that is_bitfie

[pushed] c++: Add fixed test [PR93614]

2021-12-04 Thread Marek Polacek via Gcc-patches
This was fixed by r11-86. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/93614 gcc/testsuite/ChangeLog: * g++.dg/template/lookup18.C: New test. --- gcc/testsuite/g++.dg/template/lookup18.C | 17 + 1 file changed, 17 insertions(+) create mode 100644 gcc/t

Re: [PATCH] tree-optimization/103514 Missing XOR-EQ-AND Optimization

2021-12-04 Thread Marc Glisse
+/* (a & b) ^ (a == b) -> !(a | b) */ +/* (a & b) == (a ^ b) -> !(a | b) */ +(for first_op (bit_xor eq) + second_op (eq bit_xor) + (simplify + (first_op:c (bit_and:c @0 @1) (second_op:c @0 @1)) + (if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) +&& types_match (TREE_TYPE (@0), TREE_TYPE (@1)))

[committed] wwwdocs: gcc-4.6: Avoid link to Go

2021-12-04 Thread Gerald Pfeifer
Go is sufficiently known these days that we don't need to link when we refer to it (all the more in this older page which few will read) and when doing so reduces link maintenance work. --- htdocs/gcc-4.6/changes.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/g