[PATCH 3/3] matching tokens: C++ parts (v2)

2017-08-01 Thread David Malcolm
Changed in v2: * Renamed template argument to traits_t; eliminated subclasses, just using traits struct. * Moved constants into struct bodies. * Fixed typo. OK for trunk? gcc/cp/ChangeLog: * parser.c (cp_parser_error): Update for new param to c_parse_error. (class token

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-01 Thread Jakub Jelinek
On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote: > Hello. > > Following patch does sharing of expansion for mem{p,}cpy and also strpcy > (with a known constant as source) > so that we use same type of expansion (direct insns emission, direct emission > with a loop instruction and >

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-08-01 Thread David Malcolm
On Mon, 2017-07-31 at 18:05 +0200, Marek Polacek wrote: > On Mon, Jul 31, 2017 at 09:54:03AM -0600, Martin Sebor wrote: > > On 07/31/2017 08:14 AM, Marek Polacek wrote: > > > This patch improves the diagnostic of -Wsign-compare for ?: by > > > also printing > > > the types, similarly to my recent p

[PATCH] 386: Disallow naked attribute with interrupt attribute

2017-08-01 Thread H.J. Lu
OK for trunk? H.J. --- gcc/ PR target/81654 * config/i386/i386.c (ix86_set_func_type): Disallow naked attribute with interrupt attribute. gcc/testsuite/ PR target/81654 * gcc.target/i386/pr81654.c: New test. --- gcc/config/i386/i386.c |

Re: [PATCH] 386: Disallow naked attribute with interrupt attribute

2017-08-01 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 10:20 PM, H.J. Lu wrote: > OK for trunk? > > H.J. > --- > gcc/ > > PR target/81654 > * config/i386/i386.c (ix86_set_func_type): Disallow naked > attribute with interrupt attribute. > > gcc/testsuite/ > > PR target/81654 > * gcc.target/

[PATCH] Fix thread_prologue_and_epilogue_insns (PR middle-end/79499)

2017-08-01 Thread Jakub Jelinek
Hi! In this function we insert 0-2 prologue sequences (which can sometimes contain jumps and other insns that need to end basic blocks) on edges, then commit edge insertions and then finally attempts to find out into which basic blocks the sequences were inserted and calls find_many_sub_basic_bloc

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-08-01 Thread H.J. Lu
On Tue, Aug 1, 2017 at 12:50 PM, Jakub Jelinek wrote: > On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote: >> Hello. >> >> Following patch does sharing of expansion for mem{p,}cpy and also strpcy >> (with a known constant as source) >> so that we use same type of expansion (direct insn

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 9:46 PM, H.J. Lu wrote: > Add some tests for implementing interrupt handlers with naked attribute. > > OK for trunk? > > H.J. > --- > * gcc.dg/guality/pr25967-1.c: New test. > * gcc.dg/guality/pr25967-2.c: Likewise. > * gcc.dg/torture/pr25967-1.c: Lik

Add support for const-qualified variables to -fdump-ada-spec

2017-08-01 Thread Eric Botcazou
Plus a couple of minor tweaks left and right. Bootstrapped/regtested on x86_64-suse-linux, applied on the mainline. 2017-08-01 Eric Botcazou c-family/ * c-ada-spec.c (print_generic_ada_decl):Pass correctly-typed constant (dump_ada_function_declaration): Likewise. (dum

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-08-01 Thread David Malcolm
On Tue, 2017-08-01 at 16:15 +0200, Marek Polacek wrote: > On Mon, Jul 31, 2017 at 11:31:44AM -0400, David Malcolm wrote: > > On Mon, 2017-07-31 at 16:14 +0200, Marek Polacek wrote: > > > This patch improves the diagnostic of -Wsign-compare for ?: by > > > also > > > printing > > > the types, simila

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread H.J. Lu
On Tue, Aug 1, 2017 at 1:49 PM, Uros Bizjak wrote: > On Tue, Aug 1, 2017 at 9:46 PM, H.J. Lu wrote: >> Add some tests for implementing interrupt handlers with naked attribute. >> >> OK for trunk? >> >> H.J. >> --- >> * gcc.dg/guality/pr25967-1.c: New test. >> * gcc.dg/guality/pr25

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 11:05 PM, H.J. Lu wrote: > On Tue, Aug 1, 2017 at 1:49 PM, Uros Bizjak wrote: >> On Tue, Aug 1, 2017 at 9:46 PM, H.J. Lu wrote: >>> Add some tests for implementing interrupt handlers with naked attribute. >>> >>> OK for trunk? >>> >>> H.J. >>> --- >>> * gcc.dg/gual

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread H.J. Lu
On Tue, Aug 1, 2017 at 2:11 PM, Uros Bizjak wrote: > On Tue, Aug 1, 2017 at 11:05 PM, H.J. Lu wrote: >> On Tue, Aug 1, 2017 at 1:49 PM, Uros Bizjak wrote: >>> On Tue, Aug 1, 2017 at 9:46 PM, H.J. Lu wrote: Add some tests for implementing interrupt handlers with naked attribute. O

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 11:23 PM, H.J. Lu wrote: > On Tue, Aug 1, 2017 at 2:11 PM, Uros Bizjak wrote: >> On Tue, Aug 1, 2017 at 11:05 PM, H.J. Lu wrote: >>> On Tue, Aug 1, 2017 at 1:49 PM, Uros Bizjak wrote: On Tue, Aug 1, 2017 at 9:46 PM, H.J. Lu wrote: > Add some tests for implementi

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread H.J. Lu
On Tue, Aug 1, 2017 at 2:25 PM, Uros Bizjak wrote: > On Tue, Aug 1, 2017 at 11:23 PM, H.J. Lu wrote: >> On Tue, Aug 1, 2017 at 2:11 PM, Uros Bizjak wrote: >>> On Tue, Aug 1, 2017 at 11:05 PM, H.J. Lu wrote: On Tue, Aug 1, 2017 at 1:49 PM, Uros Bizjak wrote: > On Tue, Aug 1, 2017 at 9:

Re: [PATCH] i386: Add some naked attribute tests

2017-08-01 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 11:35 PM, H.J. Lu wrote: > On Tue, Aug 1, 2017 at 2:25 PM, Uros Bizjak wrote: >> On Tue, Aug 1, 2017 at 11:23 PM, H.J. Lu wrote: >>> On Tue, Aug 1, 2017 at 2:11 PM, Uros Bizjak wrote: On Tue, Aug 1, 2017 at 11:05 PM, H.J. Lu wrote: > On Tue, Aug 1, 2017 at 1:49

Restore proper operation of -fdump-ada-spec in C++

2017-08-01 Thread Eric Botcazou
It was broken by the recent removal of TYPE_METHODS. Bootstrapped/regtested on x86_64-suse-linux, applied on the mainline. 2017-08-01 Eric Botcazou c-family/ * c-ada-spec.c (has_static_fields): Look only into fields. (dump_generic_ada_node): Small tweak. (dump_nested_

Re: [PATCH] Switch vec_init and vec_extract optabs to 2 mode optab to allow extraction of vector from vector or initialization of vector from smaller vectors (PR target/80846)

2017-08-01 Thread Segher Boessenkool
On Tue, Aug 01, 2017 at 06:21:34PM +0200, Jakub Jelinek wrote: > Apparently I broke power bootstrap with this, because two new spots were > introduced after I wrote the patch and my cross-compiler which didn't have > HAVE_AS_POWER9 defined didn't reveal that. Fixed thusly, committed as > obvious t

[PATCH] minor readability tweaks to print_node

2017-08-01 Thread Martin Sebor
This is a small readability tweak to the tree printer to have it consistently use dashes and colons in tree attribute names in favor of spaces. It's been tested on x86_64-linux. The tree printer tends to avoid using spaces to separate tree attribute names (not the __attribute__ kind but things l

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-08-01 Thread Martin Sebor
I'm wondering if the messages could use a slight rewording, to give a clue to the user about the reason *why* the expression has changed signedness. The old message "signed and unsigned type in conditional expression" gave the clue (but failed to underline the subexpression changing sign, and te

Re: [PATCH 0/3 v2] C/C++: show pertinent open token when missing a close token

2017-08-01 Thread Trevor Saunders
On Tue, Aug 01, 2017 at 04:21:41PM -0400, David Malcolm wrote: > On Wed, 2017-07-12 at 09:13 -0400, Trevor Saunders wrote: > > On Tue, Jul 11, 2017 at 11:24:45AM -0400, David Malcolm wrote: > > > + public: > > > + /* token_pair's ctor. */ > > > + token_pair () : m_open_loc (UNKNOWN_LOCATION) {}

Re: [PATCH 1/2] add unique_ptr header

2017-08-01 Thread Trevor Saunders
On Tue, Aug 01, 2017 at 10:40:53AM -0400, David Malcolm wrote: > On Mon, 2017-07-31 at 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders > > > > For most of the history of this see > > https://sourceware.org/ml/gdb-patches/2016-10/msg00223.html > > The changes are mostly s/

Re: [PATCH][2/2] early LTO debug, main part

2017-08-01 Thread Jason Merrill
On 05/19/2017 06:42 AM, Richard Biener wrote: + /* ??? In some cases the C++ FE (at least) fails to +set DECL_CONTEXT properly. Simply globalize stuff +in this case. For example +__dso_handle created via iostream line 74 col 25. */ + parent = comp_unit_die ();

Re: [PATCH] Fix thread_prologue_and_epilogue_insns (PR middle-end/79499)

2017-08-01 Thread Richard Biener
On August 1, 2017 10:35:43 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >In this function we insert 0-2 prologue sequences (which can sometimes >contain jumps and other insns that need to end basic blocks) on edges, >then commit edge insertions and then finally attempts to find out >into which basic

[PATCH] More PRE TLC

2017-08-01 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-08-02 Richard Biener * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline into ... (bitmap_insert_into_set): ... this. Index: gcc/tree-ssa-pre.c

<    1   2