[Bug c++/98859] pedantic error on use of __VA_OPT__ before C++20 is unnecessary and counterproductive

2022-11-19 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98859 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #3 from

[Bug c++/107662] New: [10 concepts] ICE using concept with dependent template parameter to define variable

2022-11-12 Thread wjwray at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- https://godbolt.org/z/rjMjeG7T1 template concept vt = true; vt auto v = 1; | ^~ internal compiler

[Bug c++/105061] [9/10 Regression] [c++2a+] anonymous bitfield templated offset rejected

2022-03-26 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105061 --- Comment #1 from Will Wray --- Hmm, the accepted simplified version ^^^ with typename parameter removed is then rejected if 'unsigned' is replaced with 'uint32_t' from #include template struct uint_offset_bitfield { uint32_t :

[Bug c++/105061] New: [9/10 Regression] [c++2a+] anonymous bitfield templated offset rejected

2022-03-26 Thread wjwray at gmail dot com via Gcc-bugs
: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- A very specific regression: https://godbolt.org/z/dWxnvd93j template struct

[Bug c++/103238] c++ Feature: array-copy experimental extensions implementing P1997

2021-11-22 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103238 --- Comment #4 from Will Wray --- First cut implementation in two patches, submitted for review: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585105.html

[Bug c++/55227] designated initializer for char array by string constant

2021-11-17 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 Will Wray changed: What|Removed |Added Attachment #51828|0 |1 is obsolete|

[Bug c++/55227] designated initializer for char array by string constant

2021-11-17 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 Will Wray changed: What|Removed |Added Attachment #51737|0 |1 is obsolete|

[Bug c++/103238] c++ Feature: array-copy experimental extensions implementing P1997

2021-11-15 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103238 --- Comment #2 from Will Wray --- (It was my own 'interesting suggestion' to myself; going stir crazy coding!) (Apologies if I stirred anything other than thought.) Thank you for emphasising the important point on DRs. It's true that some C++ D

[Bug c++/103238] New: c++ Feature: array-copy experimental extensions implementing P1997

2021-11-14 Thread wjwray at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- This is a feature-tracking PR for an incoming patch to implement C++ proposal P1997 "Relaxing restrictio

[Bug c++/84930] Brace-closed initialization of cstring (i.e."abcdefghi") to coresponding aggregate types fails in certain situation

2021-11-12 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84930 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #8 from

[Bug c++/103140] __builtin_bit_cast To C array target type

2021-11-08 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103140 --- Comment #1 from Will Wray --- Created attachment 51750 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51750&action=edit c++: __builtin_bit_cast To C array target type Proposed patch, submitted here: https://gcc.gnu.org/pipermail/gcc-p

[Bug c++/103140] New: __builtin_bit_cast To C array target type

2021-11-08 Thread wjwray at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- __builtin_bit_cast(To,from) can usefully be made to materialise a C array as its target type To: __builtin_bit_cast( unsigned char[sizeof x], x

[Bug c++/55227] designated initializer for char array by string constant

2021-11-04 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 --- Comment #11 from Will Wray --- Created attachment 51737 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51737&action=edit Proposed patch Nov 4 Sent to gcc-patches for review https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583379

[Bug c++/55227] designated initializer for char array by string constant

2021-10-25 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 --- Comment #10 from Will Wray --- Note that the initialization of 'c0' takes a different codepath: struct C {char a[2];}; C c0{.a="a"}; // [dcl.init.aggr] C c1{.a=""}; C c2{.a={"a"}}; C c3{.a={""}}; c1, c2 and c3

[Bug c++/55227] designated initializer for char array by string constant

2021-10-25 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 --- Comment #9 from Will Wray --- Adding a reshape_iter, and checking has_designator_problem, for a brace-enclosed string-literal fixes this secondary issue + reshape_iter e {CONSTRUCTOR_ELT (stripped_a_init, 0), e.cur + 1}; + if

[Bug c++/55227] designated initializer for char array by string constant

2021-10-24 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 --- Comment #8 from Will Wray --- The patch above doesn't address the secondary issue, of ignored and unchecked nested designators: C b {{.bogus="b"}}; Perhaps reshape_init should be recursed into once more?

[Bug c++/55227] designated initializer for char array by string constant

2021-10-24 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 --- Comment #7 from Will Wray --- The patch below fixes the main issue (I think, checking) by adding first_initializer_p to the error condition it errors only where designators are not allowed. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8

[Bug c++/55227] designated initializer for char array by string constant

2021-10-24 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #6 from

[Bug c++/95806] Result of call with reference argument to newed object is cached during constant evaluation

2021-08-28 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95806 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #1 from

[Bug libstdc++/101960] New: std::tuple with an array element is rejected as a named return type

2021-08-18 Thread wjwray at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- This fails to compile, going back many revisions, in any std version: https://godbolt.org/z/Kz9Mnz9aW #include std

[Bug c++/90031] Bogus parse error trying to explicitly specialize a template variable inside class scope

2021-05-30 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90031 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #1 from

[Bug c++/100231] [C++17] Variable template specialization inside a class gives compilation error

2021-05-30 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100231 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #1

[Bug c++/100459] New: [10/11 regression] constexpr decltype(auto) variable declaration bogus cv qual error

2021-05-06 Thread wjwray at gmail dot com via Gcc-bugs
Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- GCC11 rejects: constexpr decltype(auto) i = 0; GCC>10 error: decltype(a

[Bug c++/96268] class-type NTTP CTAD for string-literal aggregate fails on aggregate initialization

2021-03-08 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96268 --- Comment #4 from Will Wray --- This now appears fixed on 11 trunk

[Bug c++/99472] New: [modules] std=c++2b flag appears incompatible with C++20 module code

2021-03-08 Thread wjwray at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- Same as bug 99436, submitting with [modules] subject and CE link https://godbolt.org/z/8ME9d8 export module foo; This works: -std=c++20

[Bug c++/99471] New: Allow conversion from array of unknown bound to actual known bound

2021-03-08 Thread wjwray at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- P0388 "Permit conversions to arrays of unknown bound" in C++20 does not explicitly discuss conversion back from unknown bound to

[Bug c++/93480] Defaulted <=> doesn't expand array elements

2020-12-21 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93480 --- Comment #4 from Will Wray --- Thanks Jakub; I applied your patch to trunk and ran more test cases for nested arrays (including zero-size in various positions), union element type, base classes - all passed as expected. I tried to grok the pa

[Bug c++/93480] Defaulted <=> doesn't expand array elements

2020-12-19 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93480 --- Comment #2 from Will Wray --- For reference, here's a macro-free workaround to provide portable operator<=> for templated classes with array members, defaulting where possible (current Clang and MSVC) otherwise dispatching to a user-defined i

[Bug c++/93480] Defaulted <=> doesn't expand array elements

2020-12-18 Thread wjwray at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93480 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #1 from

[Bug c++/97246] New: [10.1 regression] mismatched argument pack lengths

2020-09-29 Thread wjwray at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- A deduced argument pack T... v now gives a "mismatched argument pack lengths" error for T... and v... i.e. static_assert( sizeof...(T) == sizeof...(v)

[Bug c++/92411] conformance issue with reinterpret_cast in constant expressions

2020-07-22 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92411 --- Comment #4 from Will Wray --- I mis-read this so was too hasty in suggesting "can be closed". The standard states that a expression evaluation fails to be a constant expression if it evaluates "reinterpret_cast" (i.e., by named token, not by

[Bug c++/92411] conformance issue with reinterpret_cast in constant expressions

2020-07-22 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92411 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #3 from

[Bug c++/96268] class-type NTTP CTAD for string-literal aggregate fails on aggregate initialization

2020-07-21 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96268 --- Comment #2 from Will Wray --- Thanks Marek (and thanks again for implementing it) - it does seem so. I've asked around a little - tcanens and brevzin point to a core issue to do with NTTP CTAD but didn't offer an opinion or encourage this bug

[Bug c++/96268] New: class-type NTTP CTAD for string-literal aggregate fails on aggregate initialization

2020-07-21 Thread wjwray at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- I understand that gcc is ahead of the standard in its implementation of class- type NTTP, along with CTAD and accepting

[Bug c++/96252] mis-optimization where identical functions have very different codegen since gcc 10

2020-07-20 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96252 --- Comment #1 from Will Wray --- Here's the code, compiler invocation and codegen output. The longer codegen expands memcpy to copy the std::array by-value arguments. -fno-inline shows the compiler call the first function from the second, then

[Bug c++/96252] New: mis-optimization where identical functions have very different codegen since gcc 10

2020-07-20 Thread wjwray at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- (Stumbled on this odd effect while examining codegen for operator<=>) The reduced sample compiles c++11 and u

[Bug c++/96185] Enhancement: Please add a builtin to count bindings in [dcl.struct.bind]

2020-07-14 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96185 --- Comment #9 from Will Wray --- An earlier draft had __builtin_tuple_size as the magic behind the P2141 proposed std::tuple_size automagic generalization to Case 3 class types. There was opposition to that name because it specifically doesn't

[Bug c++/96185] Enhancement: Please add a builtin to count bindings in [dcl.struct.bind]

2020-07-14 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96185 --- Comment #7 from Will Wray --- Oops, __builtin_bit_cast available in MSVC and Clang (when in GCC?)

[Bug c++/96185] Enhancement: Please add a builtin to count bindings in [dcl.struct.bind]

2020-07-14 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96185 --- Comment #6 from Will Wray --- Thanks for the comment on approach Jonathan: I'd noticed some collaboration and agreement around previous builtins such as __builtin_bit_cast which is now available in both GCC & Clang (though with some small in

[Bug c++/96185] Enhancement: Please add a builtin to count bindings in [dcl.struct.bind]

2020-07-14 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96185 --- Comment #2 from Will Wray --- On the Clang ticket, linked above, Richard Smith comments: Instead of the proposed direction, I'd suggest we (and other implementers) prioritize implementation of https://wg21.link/p1061r1 (which is on its

[Bug c++/96170] Enhancement: allow requires-clause checking of statement expression substitution success or failure

2020-07-13 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96170 --- Comment #2 from Will Wray --- A much better idea, submitted here as bug 96185 and simultaneously submitted to Clang and MSVC - a portable builtin to count bindings in [dcl.struct.bind]

[Bug c++/96185] Enhancement: Please add a builtin to count bindings in [dcl.struct.bind]

2020-07-13 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96185 --- Comment #1 from Will Wray --- Clang ticket https://bugs.llvm.org/show_bug.cgi?id=46704 MSVC ticket https://developercommunity.visualstudio.com/idea/203/enhancement-please-add-a-builtin-to-count-bindings.html#

[Bug c++/96185] New: Enhancement: Please add a builtin to count bindings in [dcl.struct.bind]

2020-07-13 Thread wjwray at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- (Submitting simultaneous requests for each of GCC, Clang and MSVC. Coordination between vendors will be beneficial for

[Bug c++/96170] Enhancement: allow requires-clause checking of statement expression substitution success or failure

2020-07-12 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96170 --- Comment #1 from Will Wray --- Opened an equivalent enhancement request for Clang https://bugs.llvm.org/show_bug.cgi?id=46691

[Bug c++/96170] New: Enhancement: allow requires-clause checking of statement expression substitution success or failure

2020-07-11 Thread wjwray at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- Some sort of sfinae on statement expressions containing structured bindings can provide a convenient way

[Bug c++/93862] [10 Regression] ICE on static_cast of rvalue-reference-to-array of unknown bound [P0338] to its known static bound

2020-02-26 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93862 --- Comment #8 from Will Wray --- OK. I'll try to get full confirmation and clarification on legality, with links to wording if possible, then open a new bug if valid.

[Bug c++/93862] [10 Regression] ICE on static_cast of rvalue-reference-to-array of unknown bound [P0338] to its known static bound

2020-02-26 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93862 --- Comment #6 from Will Wray --- Thanks for the quick work. However, I'm not sure that (2) and (3) _are_ invalid. (Sorry, I didn't have time to follow the email thread). I should have provided this link to an exchange with Richard Smith. I'd wa

[Bug c++/93862] New: ICE on static_cast of rvalue-reference-to-array of unknown bound [P0338] to its known static bound

2020-02-20 Thread wjwray at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- https://wandbox.org/permlink/ZaGwU3l7WbEc91Hw 1st line below an rvalue array binds, with lifetime

[Bug c++/93191] Conversions to arrays of unknown bound P0388 Fails for variadic args

2020-02-20 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93191 --- Comment #4 from Will Wray --- Reduced code for deduction of element type for reference-to-array https://godbolt.org/z/tpkKjN: int f(auto(&a)[1]); int g(auto(&a)[ ]); int test_f = f(""); int test_g = g(""); // error: no match

[Bug c++/93191] Conversions to arrays of unknown bound P0388 Fails for variadic args

2020-02-12 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93191 --- Comment #2 from Will Wray --- Actually, the issue now appears to be not with variadic args directly but with deduction (variadic Args are necessarily deduced, whether via template Arg or auto placeholder). So, for single arg, this works with

[Bug c++/93191] New: Conversions to arrays of unknown bound P0388 Fails for variadic args

2020-01-07 Thread wjwray at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- The P0388 permitted conversion from array of known bound to array-reference of unknown bound fails for variadic arguments https

[Bug c++/91364] Implement P0388R4: Permit conversions to arrays of unknown bound

2020-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91364 --- Comment #9 from Will Wray --- The variadic unknown-bound 1st overload matches exact T(&)[] only https://godbolt.org/z/9qZpWX #include void cat(auto const(&...cstr)[]) { (((void)cstr,puts("G'bye")),...); } void cat(auto const(&...cstr)[6]) {

[Bug c++/91364] Implement P0388R4: Permit conversions to arrays of unknown bound

2020-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91364 --- Comment #8 from Will Wray --- Reduced example (but still with puts output) https://godbolt.org/z/Ttc2Za #include void cat(auto const(&...cstr)[]) { (puts(cstr),...); } // Comment out this next line[6] void cat(auto const(&..

[Bug c++/91364] Implement P0388R4: Permit conversions to arrays of unknown bound

2020-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91364 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #7 from

[Bug c++/92402] parsing error in lambda trail return type with decltype, statement expressions and structured bindings

2019-11-21 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92402 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #1 from

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-02-20 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 Will Wray changed: What|Removed |Added Attachment #45683|0 |1 is obsolete|

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-02-12 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #15

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-02-04 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #14 from Will Wray --- I intend to submit a patch, or two patches, for these scalar braced init issues: Case 1: GCC rejects braced-init of scalars in aggregates. It should accept. Case 2: GCC accepts empty braced-init of scalars (com

[Bug libstdc++/88170] [9 Regression] pretty printer FAILs

2019-02-04 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88170 --- Comment #7 from Will Wray --- Thanks for the fix - apologies again for the break. Works for me. I'd lost the trail but see now that pp_c_flag_gnu_v3 is set in error.c calls decl_as_dwarf_string lang_decl_dwarf_name in turn called from cp

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-01-09 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #13 from Will Wray --- Re-reviewing, I notice that the patch I posted in comment #9 now rejects nested empty-brace scalar init: int i{{}}; which was previously accepted. So we'll need a decision on this too. Clang rejects with -p

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-01-08 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #12 from Will Wray --- On further investigation the logic of using first_initializer_p looks correct. The comment on reshape_init suggests that it wasn't intended for scalar init: /* Undo the brace-elision allowed by [dcl.init.aggr

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #10 from Will Wray --- Re: warnings; I certainly prefer to have this accepted with no warning (i.e. remove the 'else if' warning in the patch above). Saves having to disable the warning in GCC, as I have to do in Clang.

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #9 from Will Wray --- The patch below seems to work as far as I've tested - please review. It looks like the bool first_initializer_p argument to reshape_init_r gives the context that is needed, according to the function comment; /*

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #7 from Will Wray --- I guess that the bug persisted so long *because* of the status quo; portable code had to delete extra braces to silence warnings or to compile i.e. the warning on Clang served the purpose of promoting portability

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2019-01-07 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #5 from Will Wray --- Right; the patch should only apply within aggregate initialization - arrays and aggregate structures - as the initialization of actual scalars was already correct. I'll take a look now (as I meaning to fix my en

[Bug c++/87364] Pretty print of enumerator never prints the id, always falls back to C-style cast output

2019-01-03 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364 --- Comment #12 from Will Wray --- I can take a look at the weekend or early next week - reproduce the test fails and diagnose some more. I'll try to find answers to the questions I raised in comment #4 (about name mangling of enum types) and se

[Bug c++/88572] error: braces around scalar initializer - should be a warning

2018-12-28 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88572 --- Comment #1 from Will Wray --- This bug is straightforward to confirm. Compile this snippet (-std=c++11 / 14 / 17 / 2a): struct S { int i; }; S s{{0}}; Gives error: braces around scalar initializer for type 'int' Should be a wa

[Bug c++/88572] New: error: braces around scalar initializer - should be a warning

2018-12-21 Thread wjwray at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com CC: bangerth at apex68 dot ticam.utexas.edu, gcc-bugs at gcc dot gnu.org, loewis at gcc dot gnu.org

[Bug c++/72842] non-type template-parameter of type void

2018-12-05 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72842 Will Wray changed: What|Removed |Added CC||wjwray at gmail dot com --- Comment #8 from

[Bug c++/87364] Pretty print of enumerator never prints the id, always falls back to C-style cast output

2018-10-08 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364 --- Comment #6 from Will Wray --- Created attachment 44811 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44811&action=edit Patch v2, passes check_GNU_style Submitted to gcc-patches mailing list

[Bug c++/87364] Pretty print of enumerator never prints the id, always falls back to C-style cast output

2018-09-27 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364 --- Comment #5 from Will Wray --- re: https://gcc.gnu.org/ml/gcc/2018-02/msg9.html discussion on removing literal suffixes from Integral constants (part a bigger conversation I'll pick up on below). That change brought GCC into line with cla

[Bug c++/87364] Pretty print of enumerator never prints the id, always falls back to C-style cast output

2018-09-26 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364 --- Comment #4 from Will Wray --- Thanks Martin, I investigated enum template args with GCC bug 81932 test code, repeating its GDB Python-debug-print test case for enum args. Conclusion: This change to enum printing does not cause GDB to fail t

[Bug c++/87364] Pretty print of enumerator never prints the id, always falls back to C-style cast output

2018-09-21 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364 --- Comment #2 from Will Wray --- Created attachment 44735 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44735&action=edit Test for enumerator id pretty print patch pp_enum_test auto_name returns std::array, splitting the

[Bug c++/87364] Pretty print of enumerator never prints the id, always falls back to C-style cast output

2018-09-21 Thread wjwray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364 --- Comment #1 from Will Wray --- Created attachment 44734 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44734&action=edit Fix to pretty-print enumerator ids c-pretty-print.c c_pretty_printer::constant(tree) Remove fall through f

[Bug c++/87364] New: Pretty print of enumerator never prints the id, always falls back to C-style cast output

2018-09-19 Thread wjwray at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wjwray at gmail dot com Target Milestone: --- In c-pretty-print.c c_pretty_printer::constant calls pp_c_enumeration_constant