Re: [PING] C++ Re: [PATCH] C/C++: fix quoting of "aka" typedef information (PR 62170)

2017-06-21 Thread Volker Reichelt
On 20 Jun, Jason Merrill wrote: > On Tue, Jun 20, 2017 at 3:06 PM, David Malcolm wrote: >> It's not clear to me what the issue alluded to with negative >> obstack_blank is, but I chose to follow the above docs and use >> obstack_blank_fast; am testing an updated patch in which the above line >> no

Re: [PATCH] Add a few new contrib.texi entries, especially for people who perform GCC fuzzy testing and report bugs (take 2)

2018-03-07 Thread Volker Reichelt
On 03/07/2018 03:24 PM, Jakub Jelinek wrote: On Wed, Mar 07, 2018 at 02:06:33PM +0100, Jakub Jelinek wrote: As appreciation of the hard work of people doing fuzzy testing of GCC and reporting high quality bugs, I'd like to list them in contrib.texi. This patch just lists them in the GCC testing

[C++ Patch] Fix confusing diagnostics for invalid overrides

2018-03-25 Thread Volker Reichelt
does that: It replaces the error/error pattern by an error/inform pattern in search.c (check_final_overrider). And it replaces the affected dg-error marks in the testsuite by dg-message. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2018-03-25  Volker Reichelt

Re: [C++ Patch] Fix confusing diagnostics for invalid overrides

2018-03-25 Thread Volker Reichelt
On 03/25/2018 08:48 PM, Paolo Carlini wrote: Hi Volker On 25 Mar 2018, at 16:18, Volker Reichelt wrote: Hi, when overriding a virtual function fails, the C++ front-end usually emits two errors: one for the override that fails and one for the function that is overridden. The second error is

Re: [C++ Patch] Fix confusing diagnostics for invalid overrides

2018-03-27 Thread Volker Reichelt
On 03/26/2018 01:19 PM, Nathan Sidwell wrote: On 03/25/2018 10:18 AM, Volker Reichelt wrote: Index: gcc/cp/search.c === --- gcc/cp/search.c    (revision 258835) +++ gcc/cp/search.c    (working copy) @@ -1918,12 +1918,14

Re: [PING] C++ Re: [PATCH] C/C++: fix quoting of "aka" typedef information (PR 62170)

2017-07-16 Thread Volker Reichelt
On 14 Jul, Martin Sebor wrote: > On 06/21/2017 01:59 AM, Volker Reichelt wrote: >> On 20 Jun, Jason Merrill wrote: >>> On Tue, Jun 20, 2017 at 3:06 PM, David Malcolm wrote: >>>> It's not clear to me what the issue alluded to with negative >>>> ob

[PING^4] {C++ PATCH] Fix-it hints for wrong usage of 'friend' and 'auto'

2017-07-16 Thread Volker Reichelt
Hi, this is PING^4 for a C++ patch that adds fix-it hints for wrong usage of 'friend' and 'auto': https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01575.html Previous pings: https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01248.html https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00207.html https://gc

Re: [PING^4] {C++ PATCH] Fix-it hints for wrong usage of 'friend' and 'auto'

2017-07-17 Thread Volker Reichelt
On 17 Jul, David Malcolm wrote: > On Sun, 2017-07-16 at 12:13 +0200, Volker Reichelt wrote: >> Hi, >> >> this is PING^4 for a C++ patch that adds fix-it hints for wrong usage >> of 'friend' and 'auto': >> >> https://gcc.gnu.org/ml/gcc

[PATCH] Remove redundant semicolons from libstdc++ headers

2017-07-19 Thread Volker Reichelt
for trunk? Regards, Volker 2017-07-19 Volker Reichelt * libsupc++/new (bad_array_new_length): Remove redundant semicolon after in-class member function definition. * include/bits/locale_facets.h (ctype_byname, num_put): Likewise. * include/bits/locale_face

[PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-20 Thread Volker Reichelt
s later. Regards, Volker 2017-07-20 Volker Reichelt * doc/invoke.texi (-Wduplicated-access-specifiers): Document new warning option. Index: gcc/doc/invoke.texi === --- gcc/doc/invoke.texi (revision 250356) ++

Re: [PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-21 Thread Volker Reichelt
On 21 Jul, David Malcolm wrote: > On Fri, 2017-07-21 at 11:56 -0400, David Malcolm wrote: >> On Thu, 2017-07-20 at 18:35 +0200, Volker Reichelt wrote: >> > Hi, >> > >> > the following patch introduces a new C++ warning option >> > -Wduplicated

Re: [PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-21 Thread Volker Reichelt
On 21 Jul, David Malcolm wrote: > On Thu, 2017-07-20 at 18:35 +0200, Volker Reichelt wrote: >> Hi, >> >> the following patch introduces a new C++ warning option >> -Wduplicated-access-specifiers that warns about redundant >> access-specifiers in classes, e.g. >

Re: [PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-23 Thread Volker Reichelt
On 21 Jul, Martin Sebor wrote: > On 07/20/2017 10:35 AM, Volker Reichelt wrote: >> Hi, >> >> the following patch introduces a new C++ warning option >> -Wduplicated-access-specifiers that warns about redundant >> access-specifiers in classes, e.g. >> >&g

Re: [PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-23 Thread Volker Reichelt
On 21 Jul, David Malcolm wrote: > On Fri, 2017-07-21 at 19:58 +0200, Volker Reichelt wrote: >> On 21 Jul, David Malcolm wrote: >> > On Thu, 2017-07-20 at 18:35 +0200, Volker Reichelt wrote: >> >> Hi, >> >> >> >> the following patch introdu

[PATCH v2] New C++ warning option '-Waccess-specifiers'

2017-07-23 Thread Volker Reichelt
OK. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-07-22 Volker Reichelt * doc/invoke.texi (-Waccess-specifiers, -Waccess-specifiers=): Document new warning options. Index: gcc/doc/invoke.texi =

Re: [PATCH v2] New C++ warning option '-Waccess-specifiers'

2017-07-23 Thread Volker Reichelt
On 23 Jul, Eric Gallager wrote: > On 7/23/17, Volker Reichelt wrote: >> Hi again, >> >> here is an updated patch for a new warning about redundant >> access-specifiers. It takes Dave's various comments into account. >> >> The main changes w.r.t. to th

Re: [PATCH v2] New C++ warning option '-Waccess-specifiers'

2017-07-25 Thread Volker Reichelt
On 25 Jul, Marek Polacek wrote: > On Sun, Jul 23, 2017 at 11:22:14PM +0200, Volker Reichelt wrote: > [...] > > Not sure if the warning is too useful, but in any case... > >> + /* Emit warning. */ >> + gcc_rich_location richloc (token->location); >> + r

Re: [PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-25 Thread Volker Reichelt
On 23 Jul, Martin Sebor wrote: > On 07/23/2017 02:42 PM, Volker Reichelt wrote: >> On 21 Jul, Martin Sebor wrote: >>> On 07/20/2017 10:35 AM, Volker Reichelt wrote: >>>> Hi, >>>> >>>> the following patch introduces a new C++ warning optio

Re: [PATCH] c++ parser: fix-it hints for wrong usage of 'friend' and 'auto'

2017-05-06 Thread Volker Reichelt
On 2 May, Martin Sebor wrote: > On 04/29/2017 04:23 PM, Volker Reichelt wrote: >> Hi, >> >> the following patch adds fix-it hints to the C++ parser for two wrongly >> used keywords detected in cp_parser_decl_specifier_seq. >> >> Bootstrapped and regtest

[PATCH] PR80280: Fix quoting of candidate functions

2017-05-06 Thread Volker Reichelt
only the candidate function, but also the surrounding text is quoted in the second-to-last line. With the patch, this line reads: bug.cc:2:10: note: candidate: 'operator!(bool)' Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-05

Re: [PATCH] PR80280: Fix quoting of candidate functions

2017-05-07 Thread Volker Reichelt
OK, committed as obvious (r247728). Regards, Volker On 7 May, Martin Sebor wrote: > On 05/06/2017 02:41 PM, Volker Reichelt wrote: >> Hi, >> >> the following patch fixes some wrong quoting that was introduced by >> Martin's patch for PR translation/80280, see &g

Re: {PATCH] New C++ warning -Wcatch-value

2017-05-07 Thread Volker Reichelt
On 2 May, Martin Sebor wrote: > On 05/01/2017 02:38 AM, Volker Reichelt wrote: >> Hi, >> >> catching exceptions by value is a bad thing, as it may cause slicing, i.e. >> a) a superfluous copy >> b) which is only partial. >> See also >> https://gi

Re: [PATCH] Pretty-printing of some unsupported expressions (PR c/35441)

2017-05-07 Thread Volker Reichelt
On 2 May, Joseph Myers wrote: > On Fri, 10 Mar 2017, Volker Reichelt wrote: > >> a) This part (with foo1 and foo2 from the testcase) is straightforward. > > That part is OK. > >> b) I chose the shift operators 'a << b' and 'a >> b'

Re: {PATCH] New C++ warning -Wcatch-value

2017-05-14 Thread Volker Reichelt
On 7 May, Martin Sebor wrote: > On 05/07/2017 02:03 PM, Volker Reichelt wrote: >> On 2 May, Martin Sebor wrote: >>> On 05/01/2017 02:38 AM, Volker Reichelt wrote: >>>> Hi, >>>> >>>> catching exceptions by value is a bad thing, as it may

[PING] for three diagnostic-related patches

2017-05-15 Thread Volker Reichelt
Hi, I'd like to ping the following diagnostic-related patches that might have slipped through the cracks: C++ parser: Fix typos in error messages: https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00048.html Fix-it hints for wrong usage of 'friend' and 'auto': https://gcc.gnu.org/ml/gcc-patches/2017

Re: {PATCH] New C++ warning -Wcatch-value

2017-05-29 Thread Volker Reichelt
t; > Agreed. But then you'll probably want to allow -Wno-catch-value to turn it > off. > > Jason So how about the following then? Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-05-30 Volker Reichelt * doc/invoke.texi (-Wcatc

[PING^2] for three diagnostic-related patches

2017-06-05 Thread Volker Reichelt
Hi again, I'd like to re-ping those patches below before they start to bit-rot ;-) Regards, Volker On 16 May, Volker Reichelt wrote: > Hi, > > I'd like to ping the following diagnostic-related patches that might > have slipped through the cracks: > > C++ parser:

Re: {PATCH] New C++ warning -Wcatch-value

2017-06-05 Thread Volker Reichelt
On 15 May, Martin Sebor wrote: >> So how about the following then? I stayed with the catch part and added >> a parameter to the warning to let the user decide on the warnings she/he >> wants to get: -Wcatch-value=n. >> -Wcatch-value=1 only warns for polymorphic classes that are caught by >> value (

[PATCH] Add missing entry for -Wduplicated-branches

2017-06-05 Thread Volker Reichelt
Hi, the warning option -Wduplicated-branches added by Marek in r244705 https://gcc.gnu.org/viewcvs?rev=244705&root=gcc&view=rev lacks an entry in the warning list of doc/invoke.texi. The patch below fixes that. OK for trunk? What about the GCC 7 branch? Regards, Volker 2017-06-05

Re: [PATCH] Add missing entry for -Wduplicated-branches

2017-06-05 Thread Volker Reichelt
On 5 Jun, Marek Polacek wrote: > On Mon, Jun 05, 2017 at 02:38:11PM +0200, Volker Reichelt wrote: >> Hi, >> >> the warning option -Wduplicated-branches added by Marek in r244705 >> https://gcc.gnu.org/viewcvs?rev=244705&root=gcc&view=rev >> lacks an ent

[Patch C++/80296] Fix broken diagnostic: 'unary_plus_expr' not supported by expression

2017-04-03 Thread Volker Reichelt
don't call cxx_pretty_printer::unary_expression. Fixed with the patch below. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Or should this wait for stage 1? Regards, Volker 2017-04-03 Volker Reichelt PR c++/80296 * cxx-pretty-print.c (cxx_pretty_printer::e

[C++ PATCH] New warning for extra semicolons after in-class function definitions

2017-04-07 Thread Volker Reichelt
class function definition [-Wextra-semi] void foo() {}; ^ Wextra-semi.C:5:23: warning: extra ';' after in-class function definition [-Wextra-semi] friend void bar() {}; ^ Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for stage 1, once G

[C++ PATCH] New warning for extra semicolons after in-class function definitions

2017-04-07 Thread Volker Reichelt
class function definition [-Wextra-semi] void foo() {}; ^ Wextra-semi.C:5:23: warning: extra ';' after in-class function definition [-Wextra-semi] friend void bar() {}; ^ Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for stage 1, once G

Re: [C++ PATCH] New warning for extra semicolons after in-class function definitions

2017-04-09 Thread Volker Reichelt
On 7 Apr, David Malcolm wrote: > On Fri, 2017-04-07 at 21:55 +0200, Volker Reichelt wrote: >> Hi, >> >> with the following patch I suggest to add a diagnostic for extra >> semicolons after in-class member function definitions: >> >> struct

[C++ PATCH] Fix-it info for duplicate tokens

2017-04-21 Thread Volker Reichelt
Hi, the following patch adds fix-it info to error messages in 4 places where the C++ parser complains about duplicate tokens. The fix-it infos suggest to remove the duplicates. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-04-21 Volker Reichelt

[PATCH] Simplify quoting in diagnostics of C++ frontend

2017-04-23 Thread Volker Reichelt
that be replaced with %qE? OK for trunk? Regards, Volker 2017-04-23 Volker Reichelt * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics. (start_enum): Likewise. (build_enumerator): Likewise. * parser.c (cp_parser_mem_initializer_list): Use

[PATCH, C++] Fix-it info for invalid class/struct after enum

2017-04-25 Thread Volker Reichelt
a 4th call to get the token's location. I also fixed the broken indentation of the pedwarn. Thanks to David for suggesting to use gcc_rich_location::add_range to highlight multiple tokens. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-04-25 Volke

[PATCH, C++] Fix-it info for typo in nested-name-specifier

2017-04-26 Thread Volker Reichelt
Hi, the following patch adds fix-it information for a diagnostic in the C++ parser: Use a scope operator instead of a single colon in a nested-name-specifier. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-04-26 Volker Reichelt * parser.c

[PATCH] Improved diagnostics for casts and enums

2017-04-27 Thread Volker Reichelt
ux-gnu. OK for trunk (as two patches or as one)? Regards, Volker 2017-04-27 Volker Reichelt * parser.c (cp_parser_cast_expression): Add target type of cast to diagnostic. Index: gcc/cp/parser.c === --- gcc/cp/p

Re: [PATCH] Improved diagnostics for casts and enums

2017-04-28 Thread Volker Reichelt
On 27 Apr, Martin Sebor wrote: > On 04/27/2017 01:29 AM, Volker Reichelt wrote: >> Hi, >> >> the following two patches aim at improving GCC's diagnostics to help >> the user to get rid of old-style casts. While old-style pointer casts >> are really bad and ne

[PATCH] C++ parser: two fix-it hints for broken member declarations

2017-04-29 Thread Volker Reichelt
Hi, the following patch adds fix-it hints to the C++ parser for a stray comma and a missing semicolon at the end of a member declaration. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-04-29 Volker Reichelt * parser.c

[PATCH] c++ parser: fix-it hints for wrong usage of 'friend' and 'auto'

2017-04-29 Thread Volker Reichelt
Hi, the following patch adds fix-it hints to the C++ parser for two wrongly used keywords detected in cp_parser_decl_specifier_seq. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-04-29 Volker Reichelt * parser.c (cp_parser_decl_specifier_seq

Re: [PATCH] Improved diagnostics for casts and enums

2017-04-30 Thread Volker Reichelt
On 28 Apr, Volker Reichelt wrote: > On 27 Apr, Martin Sebor wrote: >> On 04/27/2017 01:29 AM, Volker Reichelt wrote: >>> Hi, >>> >>> the following two patches aim at improving GCC's diagnostics to help >>> the user to get rid of old-style casts. Wh

{PATCH] New C++ warning -Wcatch-value

2017-05-01 Thread Volker Reichelt
handlers of non-reference type, the following patch adds a new C++/ObjC++ warning option "-Wcatch-value". Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Regards, Volker 2017-05-01 Volker Reichelt * doc/invoke.texi (-Wcatch-value): Document new warning opti

[PATCH] C++ parser: Fix typos in error messages

2017-05-01 Thread Volker Reichelt
Hi, the following patch fixes two typos in error messages of the C++ parser (which have gone unnoticed since GCC 3.4.0). Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? Should this go also to GCC 7.2? Regards, Volker 2017-05-01 Volker Reichelt * parser.c

[PATCH] Some more translation related tweaks

2017-02-26 Thread Volker Reichelt
After Jakub's and Marek's latest translation patches, I grepped for other unmarked messages. Here's what I found in the C++ front-end. Bootstrapped/regtested on x86_64-linux, ok for trunk? Regards, Volker 2017-02-26 Volker Reichelt * init.c: Include intl.h

Re: [PATCH] Some more translation related tweaks

2017-02-27 Thread Volker Reichelt
On 26 Feb, Jakub Jelinek wrote: > On Sun, Feb 26, 2017 at 01:18:57PM +0100, Volker Reichelt wrote: >> 2017-02-26 Volker Reichelt >> >> * init.c: Include intl.h > > Missing . Indeed, I noticed that one after I hit the send button. >> @@ -29,

Re: [PATCH] Some more translation related tweaks

2017-02-27 Thread Volker Reichelt
On 27 Feb, Jakub Jelinek wrote: > On Mon, Feb 27, 2017 at 11:04:36AM +0100, Volker Reichelt wrote: >> So here's the second attempt: >> >> 2017-02-27 Volker Reichelt >> >> * init.c: Include intl.h. >> (build_new_1): Move message string

[PATCH] Pretty-printing of some unsupported expressions (PR c/35441)

2017-03-09 Thread Volker Reichelt
x27;!(p >= q) ? p : q' that are all converted into MIN_EXPR, so I would rather stay with and explicit 'min'/'max' instead. In addition I found some more division operators in gcc/tree.def that aren't handled by the pretty-printer: CEIL_DIV_EXPR FLO