Teaching emacs about GCC coding conventions (was Re: [PATCH] tree_code_name wrapper)

2013-10-16 Thread David Malcolm
On Tue, 2013-10-15 at 13:19 +, Paulo Matos wrote: > > -Original Message- > > From: Jakub Jelinek [mailto:ja...@redhat.com] > > Sent: 15 October 2013 10:51 > > To: Paulo Matos > > Cc: Richard Biener; Paolo Carlini; gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] tree_code_name wrapper >

[jit] Revamp of locals handling (changing API)

2013-10-16 Thread David Malcolm
c/jit/ChangeLog.jit index da3e75a..54953b6 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,30 @@ +2013-10-16 David Malcolm + + * TODO.rst (gcc_jit_context_new_local): Remove completed item. + * internal-api.c (gcc::jit::context::new_local): Replace with... +

[jit] Update TODO.rst

2013-10-17 Thread David Malcolm
c/jit/ChangeLog.jit index 54953b6..162c3de 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,7 @@ +2013-10-17 David Malcolm + + * TODO.rst: Update. + 2013-10-16 David Malcolm * TODO.rst (gcc_jit_context_new_local): Remove completed item. diff --git a/gcc/jit/TOD

[jit] Rewrite of primitive types (API change)

2013-10-17 Thread David Malcolm
@@ 2013-10-17 David Malcolm + * internal-api.c (gcc::jit::context::get_void_type): Remove. + (gcc::jit::context::get_char_type): Remove. + (gcc::jit::context::get_int_type): Remove. + (gcc::jit::context::get_float_type): Remove. + (gcc::jit::context::get_doubl

[jit] Improvements to API documentation within header file

2013-10-17 Thread David Malcolm
c/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 162c3de..d0c76fc 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,9 @@ 2013-10-17 David Malcolm + * libgccjit.h: Add and reword comments throughout. + +2013-10-17 David Malcolm + * TODO.rst: Update. 20

Re: Teaching emacs about GCC coding conventions (was Re: [PATCH] tree_code_name wrapper)

2013-10-18 Thread David Malcolm
On Wed, 2013-10-16 at 11:32 -0700, Mike Stump wrote: > On Oct 16, 2013, at 9:26 AM, Tom Tromey wrote: > > Andreas> You could put it in .dir-locals.el, or put a hook on > > Andreas> find-file-hook that looks at buffer-file-name. > > > We checked in a .dir-locals.el for gdb. I recommend it for GCC

Re: libbacktrace patch committed (Was: Re: [jit] Update TODO.rst)

2013-10-18 Thread David Malcolm
On Thu, 2013-10-17 at 21:28 -0700, Ian Lance Taylor wrote: > On Thu, Oct 17, 2013 at 8:54 PM, David Malcolm wrote: > > > > +* segfault seen in libbacktrace, when an ICE occurs > > That reminded me to commit this libbacktrace patch I worked up a > couple of weeks ago.

[jit] Improvements to error-handling

2013-10-18 Thread David Malcolm
(+), 51 deletions(-) create mode 100644 gcc/testsuite/jit.dg/test-null-passed-to-api.c diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 78c1b65..bcbb93b 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,85 @@ +2013-10-18 David Malcolm + + * internal

[jit] Various changes to expression-handling (API changes)

2013-10-18 Thread David Malcolm
/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index bcbb93b..7c574e8 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,75 @@ 2013-10-18 David Malcolm + * internal-api.c (gcc::jit::context::new_param): Add context + argument to ctor for rvalue and its su

[jit] Implement gcc_jit_lvalue_get_address

2013-10-21 Thread David Malcolm
+++ 9 files changed, 104 insertions(+), 5 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 7c574e8..e16902d 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,12 @@ +2013-10-21 David Malcolm + + * TODO.rst ("the C unary

[jit] Improve error message in gcc_jit_function_new_local

2013-10-21 Thread David Malcolm
files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index e16902d..df08834 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,11 @@ 2013-10-21 David Malcolm + * libgccjit.c (gcc_jit_function_new_local): Use a

[jit] Show source locations (if any) in gimple dump

2013-10-21 Thread David Malcolm
/ChangeLog.jit b/gcc/jit/ChangeLog.jit index df08834..adf273b 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,10 @@ 2013-10-21 David Malcolm + * internal-api.c (gcc::jit::context::postprocess): Show source + line numbers (if any) in gimple dump. + +2013-10-21

[jit] Fix error-handling within gcc::jit::context::compile (timevar issues)

2013-10-21 Thread David Malcolm
/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,5 +1,13 @@ 2013-10-21 David Malcolm + * internal-api.c (gcc::jit::context::compile): Correctly cleanup + timevars in error-handling, preventing an issue where an error + on a context left timevar.c in an unstopped state, leading

[jit] Add gcc_jit_context_get_first_error

2013-10-22 Thread David Malcolm
@@ -1,3 +1,14 @@ +2013-10-22 David Malcolm + + * internal-api.c (gcc::jit::context::add_error_va): Record the + first error that occurs on a context. + (gcc::jit::context::get_first_error): New. + * internal-api.h (gcc::jit::context::get_first_error): New. + (gcc::jit

[jit] Add missing include of diagnostic-core.h

2013-10-23 Thread David Malcolm
--- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,7 @@ +2013-10-23 David Malcolm + + * internal-api.c: Add missing include of diagnostic-core.h + 2013-10-22 David Malcolm * internal-api.c (gcc::jit::context::add_error_va): Record the diff --git a/gcc/jit/internal

[jit] Merger from trunk into jit

2013-10-23 Thread David Malcolm
I've merged trunk r203980 into "dmalcolm/jit", in particular bringing in the fix for the segfault seen in libbacktrace when an ICE happened in libgccjit (fix was on trunk on r203810). gcc/jit/ * internal-api.c: Update for rename of tree-flow.h to tree-cfg.h in r203320, for

[wwwdocs] Add link to jit mailing list to lists.html

2013-10-23 Thread David Malcolm
OK to commit to CVS? (fwiw the pre-existing page content doesn't validate as per http://gcc.gnu.org/contribute.html#webchanges, due to issues with the ) Index: htdocs/lists.html === RCS file: /cvs/gcc/wwwdocs/htdocs/lists.html,v retr

Re: [wwwdocs] Add link to jit mailing list to lists.html

2013-10-23 Thread David Malcolm
On Thu, 2013-10-24 at 01:46 +0200, Gerald Pfeifer wrote: > On Wed, 23 Oct 2013, David Malcolm wrote: > > OK to commit to CVS? > > Yes, thank you, David. Thanks; committed. > > (fwiw the pre-existing page content doesn't validate as per > > http://gcc.gnu.org/co

Re: [PATCH v2 2/4] Parse base classes for GTY-marked types

2013-10-23 Thread David Malcolm
On Tue, 2013-10-15 at 12:45 -0600, Jeff Law wrote: > On 09/24/13 11:49, David Malcolm wrote: > > Extend gengtype (and gtype.state reading/writing) so that it is able to > > parse base classes in simple cases, and only attempt to do it for > > GTY-marked types. > >

Re: [PATCH v2 4/4] Add documentation about gengtype and inheritance

2013-10-23 Thread David Malcolm
On Tue, 2013-10-15 at 12:49 -0600, Jeff Law wrote: > On 09/24/13 11:49, David Malcolm wrote: > > gcc/ > > * doc/gty.texi (GTY Options): Add note about inheritance to > > description of desc and tag. > > (Inheritance and GTY): New. > So what happens if I ha

[jit] Fix various issues relating to gcc_jit_location.

2013-10-24 Thread David Malcolm
-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index 6308c6d..30664be 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,13 @@ +2013-10-24 David Malcolm + + * internal-api.c (gcc::jit::function::add

[jit] Add fuzz-testing program for API

2013-10-24 Thread David Malcolm
suite/ChangeLog.jit index 0476507..18b6d9a 100644 --- a/gcc/testsuite/ChangeLog.jit +++ b/gcc/testsuite/ChangeLog.jit @@ -1,3 +1,8 @@ +2013-10-24 David Malcolm + + * jit.dg/harness.h (main): Wrap with #ifndef TEST_PROVIDES_MAIN + * jit.dg/test-fuzzer.c: New. + 2013-10-22 David Ma

[PATCH] Fix names of various macro parameters in tree.h

2013-10-24 Thread David Malcolm
I noticed that some of the macros in tree.h that act on trees have parameters named "CODE", rather "NODE", which is confusing when in the presence of other macros that act on enum tree_code values. The attached patch renames such params for macros that I believe act on trees (mostly because they g

Re: [PATCH 1/2] Handwritten part of conversion of IPA pass hooks to virtual functions

2013-10-25 Thread David Malcolm
The patches still apply cleanly to trunk; I'm rechecking the bootstrap and regtest. Are they OK for trunk if the testing passes? [For context: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00639.html ] Thanks Dave > On Thu, Oct 10, 2013 at 2:41 AM, David Malcolm wrote: >

[PATCH] make gengtype more robust against user error

2013-10-25 Thread David Malcolm
This patch addresses various forms of failure described in http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01974.html It adds a "default: gcc_unreachable();" to the autogenerated switch() statement in the routines for a base class, converting various kinds of tag errors from leading to silent lack-of

Re: [PATCH v2 3/4] Handle simple inheritance in gengtype.

2013-10-28 Thread David Malcolm
On Tue, 2013-10-15 at 12:58 -0600, Jeff Law wrote: [...] > This is OK. Thanks; committed to trunk as r204146. (I was holding off until approval of the robustification followup, which you've now approved, as [1]). Dave [1] http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02330.html

Limited support for inheritance in gengtype now in trunk (was Re: [PATCH] make gengtype more robust against user error)

2013-10-28 Thread David Malcolm
On Mon, 2013-10-28 at 15:19 -0600, Jeff Law wrote: > On 10/25/13 15:37, David Malcolm wrote: > > This patch addresses various forms of failure described in > > http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01974.html > > > [...] > Thanks for diving into this stuff and ge

[PATCH (updated)] Convert symtab, cgraph and varpool nodes into a real class hierarchy

2013-10-28 Thread David Malcolm
d patch reinstates them, albeit to the symtab_node_base base class, and inspection of the generated gtype-desc.c shows that the generated code does the right thing. Is this change also OK for trunk? (I'm still bootstrapping/regtesting the patch series now, so the above is all conditional on t

Re: [PATCH (updated)] Convert symtab, cgraph and varpool nodes into a real class hierarchy

2013-10-28 Thread David Malcolm
On Mon, 2013-10-28 at 22:57 -0400, David Malcolm wrote: > On Fri, 2013-09-20 at 17:33 +0200, Jan Hubicka wrote: > > > This patch is the handwritten part of the conversion of these types > > > to C++; it requires the followup patch, which is autogenerated. > > > >

Symtab, cgraph and varpool nodes are now a real class hierarchy

2013-10-29 Thread David Malcolm
On Mon, 2013-10-28 at 23:37 -0600, Jeff Law wrote: > On 10/28/13 20:57, David Malcolm wrote: > >>> * cgraph.h (symtab_node_base): Convert to a class; > >>> add GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"))). > >>> (cgraph_

Re: [PATCH v2 3/6] Split symtab_node declarations onto multiple lines

2013-10-30 Thread David Malcolm
On Tue, 2013-09-10 at 15:36 +0200, Jan Hubicka wrote: > > Amongst other things, the rename_symtab.py script converts > > "symtab_node" to "symtab_node *". > > > > This will lead to broken code on declarations that declare > > more than one variable (only the first would get a "*"), so split > > up

Pre-Patch RFC: proposed changes to option-lookup

2013-10-30 Thread David Malcolm
[Sending this to gcc-patches to double-check that the idea is sound before continuing to work on this large patch. [1] ] I want to eliminate hidden use of the preprocessor in our code, in favor of using block caps to signal to people reading the code that macro magic is happening. As a specific e

[PATCH 1/6] Convert gimple types from a union to C++ inheritance

2013-10-31 Thread David Malcolm
* Makefile.in (GIMPLE_H): Add dep on is-a.h. * coretypes.h (union gimple_statement_d): Remove declaration. (gimple): Convert from being a "union gimple_statement_d *" to a "struct gimple_statement_base *". (const_gimple): Likewise (with "const"). * gg

[PATCH 2/6] Hand-written port of various accessors within gimple.h

2013-10-31 Thread David Malcolm
* gimple.h (gimple_use_ops): Port from union to usage of dyn_cast. (gimple_set_use_ops): Port from union to usage of as_a. (gimple_set_vuse): Likewise. (gimple_set_vdef): Likewise. (gimple_call_internal_fn): Port from union to a static_cast, g

[PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-10-31 Thread David Malcolm
n't handle). * Patch 6 of 6: This patch updates the gdb python pretty-printing hook. Successfully bootstrapped and tested on x86_64-unknown-linux-gnu: all testcases show the same results as an unpatched build (relative to r204230). OK for trunk? David Malcolm (6): Convert gi

[PATCH 4/6] Implement is_a_helper <>::test specializations for various gimple types

2013-10-31 Thread David Malcolm
* gimple.h (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): New. --- gcc/gimple.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/gcc/gimple.h b/gcc/gimple.h index f258992..710

[PATCH 6/6] Update gdb hooks to reflect changes to gimple types

2013-10-31 Thread David Malcolm
gcc/ * gdbhooks.py (GimplePrinter.to_string): Update lookup of code field to reflect inheritance, rather than embedding of the base gimple type. --- gcc/gdbhooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py index 5

[PATCH 5/6] Port various places from union access to subclass access.

2013-10-31 Thread David Malcolm
* gimple-streamer-in.c (input_gimple_stmt): Port from union access to use of as_a. * gimple.c (gimple_build_asm_1): Likewise. (gimple_build_try): Likewise. Also, return a specific subclass rather than just gimple. (gimple_build_resx): Port from union

[PATCH] Support multiline GTY markers in Doxygen filter; add unittests

2013-10-31 Thread David Malcolm
It's possible to run GCC's sources through Doxygen by setting INPUT_FILTER = contrib/filter_gcc_for_doxygen within contrib/gcc.doxy and invoking doxygen on the latter file. The script filters out various preprocessor constructs from GCC sources before Doxygen tries to parse them.

symtab_node is now a struct, not a pointer (was Re: [PATCH v2 4/6] Remove symtab_node and const_symtab_node typedefs.)

2013-10-31 Thread David Malcolm
On Tue, 2013-09-10 at 15:37 +0200, Jan Hubicka wrote: > > gcc/ > > > > * ipa-ref.h (symtab_node): Remove typedef to pointer type, as it > > clashes with the preferred name for the base class. > > (const_symtab_node): Remove redundant typedef. > > This is OK, too. > Actually it is not

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-01 Thread David Malcolm
On Fri, 2013-11-01 at 17:36 -0400, Andrew MacLeod wrote: > On 10/31/2013 12:26 PM, David Malcolm wrote: > > [Shamelessly hijacking Andrew's thread about gimple.h refactoring, > > since this seems on-topic for that, and I'm keen to hear from Andrew on > > how the fo

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-01 Thread David Malcolm
On Fri, 2013-11-01 at 22:57 +0100, Jakub Jelinek wrote: > On Fri, Nov 01, 2013 at 05:47:14PM -0400, Andrew MacLeod wrote: > > On 11/01/2013 05:41 PM, Jakub Jelinek wrote: > > >On Fri, Nov 01, 2013 at 05:36:34PM -0400, Andrew MacLeod wrote: > > >> static inline void > > >>! gimple_call_set_lhs (gi

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-04 Thread David Malcolm
On Mon, 2013-11-04 at 16:43 -0500, David Malcolm wrote: > On Mon, 2013-11-04 at 08:19 -0500, Andrew MacLeod wrote: > > On 11/01/2013 06:58 PM, David Malcolm wrote: > > > On Fri, 2013-11-01 at 22:57 +0100, Jakub Jelinek wrote: > > >> On Fri, Nov 01, 2013 at 05:47:14

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)

2013-11-05 Thread David Malcolm
On Tue, 2013-11-05 at 12:47 +0100, Richard Biener wrote: > On Mon, Nov 4, 2013 at 10:43 PM, David Malcolm wrote: > > On Mon, 2013-11-04 at 08:19 -0500, Andrew MacLeod wrote: > >> On 11/01/2013 06:58 PM, David Malcolm wrote: > >> > On Fri, 2013-11-01 at 22:57 +0100, J

[PATCH] PR other/69006: fix extra newlines after diagnostics (v2)

2016-01-25 Thread David Malcolm
Here's an updated version of the patch. On Wed, 2016-01-13 at 18:32 +0100, Bernd Schmidt wrote: > On 01/13/2016 01:57 AM, David Malcolm wrote: > > There are five places in trunk that can call diagnostic_show_locus. > > I'd kind of like to see before/after example ou

Re: [PATCH] jit: Fix missing references to pthread in jit-playback.c

2016-01-25 Thread David Malcolm
On Sat, 2016-01-23 at 19:08 +0100, Iain Buclaw wrote: > Hi, > > I noticed when building from 2016-01-17 snapshot that the JIT frontend > failed to build. > > --- > jit-playback.c:2075:36: error: ‘PTHREAD_MUTEX_INITIALIZER’ was not > declared in this scope > jit-playback.c: In member function ‘voi

Re: [PATCH] PR other/69006: fix extra newlines after diagnostics (v2)

2016-01-26 Thread David Malcolm
On Tue, 2016-01-26 at 12:18 +0100, Bernd Schmidt wrote: > On 01/25/2016 09:13 PM, David Malcolm wrote: > > Here's an updated version of the patch. > > Thanks! > > > Instead of testing one particular kind of output via a plugin, > > this version of the patch a

Re: Patch RFA: Add option -fcollectible-pointers, use it in ivopts

2016-01-26 Thread David Malcolm
On Tue, 2016-01-26 at 05:35 -0800, Ian Lance Taylor wrote: [...] > Index: common.opt > === > --- common.opt (revision 232580) > +++ common.opt (working copy) > @@ -1380,6 +1380,10 @@ > Enable hoisting adjacent loads to encourage ge

[wwwdocs][PATCH] Add notes on -Wmisleading-indentation to GCC 6 porting guide

2016-01-26 Thread David Malcolm
htdocs/gcc-6/porting_to.html is looking rather empty right now. The attached patch starts fleshing it out by adding some notes on -Wmisleading-indentation. [see the notes at https://gcc.gnu.org/ml/gcc/2016-01/msg00224.html on what -Wmisleading-indentation ran into on a mass-rebuild of Debian] I

Re: [PATCH] PR other/69006: S/390: Fix extra newlines after diagnostics.

2016-01-27 Thread David Malcolm
On Wed, 2016-01-27 at 12:01 +0100, Dominik Vogt wrote: > The attached patch removes a blank line after an error message. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69006 Presumably this was exposed by the stricter testing I added to lib/gcc -dg.exp in r232837? >else if (num_matches > 1) >

Re: [PATCH] libcpp: use better locations for _Pragma tokens (preprocessor/69126)

2016-01-28 Thread David Malcolm
On Thu, 2016-01-28 at 11:12 -0800, Steve Ellcey wrote: > David, > > This patch has broken the top-of-tree glibc build Bother; sorry. FWIW, I'm about to get on a plane (for FOSDEM), so I'm not in a great position to tackle this yet. > I get an error on an > undef that is supposed to be protected

Re: [PATCH] libcpp: use better locations for _Pragma tokens (preprocessor/69126)

2016-01-28 Thread David Malcolm
On Thu, 2016-01-28 at 14:48 -0500, David Malcolm wrote: > On Thu, 2016-01-28 at 11:12 -0800, Steve Ellcey wrote: > > David, > > > > This patch has broken the top-of-tree glibc build > > Bother; sorry. FWIW, I'm about to get on a plane (for FOSDEM), so > I&#x

Re: [PATCH] Fix up _Pragma GCC diagnostics regressions (PR preprocessor/69543, PR c/69558)

2016-01-29 Thread David Malcolm
On Fri, 2016-01-29 at 20:50 +0100, Jakub Jelinek wrote: > Hi! > > This patch reverts one tiny change from r228049 changes (which hasn't > been > mentioned in the ChangeLog or patch description). We definitely need > to > revisit this for GCC 7, but stage4 is probably not the right time for > that

[PATCH] Re: [wwwdocs] Add common C++ issues to /gcc-6/porting_to.html

2016-02-03 Thread David Malcolm
On Tue, 2016-02-02 at 20:36 +, Jonathan Wakely wrote: I had some difficulty reading the new section; mostly due to the leapfrogging of C++11 by the default (my immediate reaction was "why is it talking about C++11 when the option says GNU++14?") I'm attaching a patch which I hope clarifies it

Re: [PATCH] Fix valgrind reported issue with diagnostics caret (PR c/69627)

2016-02-03 Thread David Malcolm
On Wed, 2016-02-03 at 21:07 +0100, Jakub Jelinek wrote: > Hi! > > As range->m_caret.m_{line,column} is only initialized if > range->m_show_caret_p is true, we really shouldn't be looking at > those > fields otherwise. > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, > ok for

[PATCH] Fix jit crash on aarch64, mips

2016-02-04 Thread David Malcolm
The jit testsuite was showing numerous segfaults and fatal errors for trunk on aarch64; typically on the 2nd iteration of each test, with errors like: test-volatile.c.exe: fatal error: pass ‘rnreg’ not found but is referenced by new pass ‘whole-program’ where the new pass' name varies, and can be

[PATCH] PR preprocessor/69664: fix rich_location::override_column

2016-02-04 Thread David Malcolm
In gcc 5 and earlier, struct diagnostic_info had a field: unsigned int override_column; which could be set by the macro: diagnostic_override_column This was only used by the frontends' callbacks for handling errors from libcpp: c_cpp_error for the c-family, and cb_cpp_error for Fortran: if (

[PATCH][wwwdocs] Add blurb to top of gcc-6/changes.html

2016-02-05 Thread David Malcolm
The attached patch adds a summary blurb to the top of the GCC 6 changes page, emphasizing that there have been more improvements that we could ever hope to enumerate, and providing prominent links to the porting page, and to the general documentation (albeit to the "Development" version for now, si

Re: [PATCH] add basic .gitattributes files to notice whitespace issues

2016-02-05 Thread David Malcolm
On Thu, 2016-02-04 at 21:00 -0500, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders > > Hi, > > We can tell git to highlight whitespace errors in diffs, and if you > enable the > default pre-commit hook git won't allow you to make a commit with a > whitespace > error violating the rules

[committed] jit: fix build after r233218 (build_common_tree_nodes, -fshort-double)

2016-02-08 Thread David Malcolm
geLog === --- gcc/jit/ChangeLog (revision 233221) +++ gcc/jit/ChangeLog (revision 233222) @@ -1,3 +1,9 @@ +2016-02-08 David Malcolm + + * dummy-frontend.c (jit_langhook_init): Remove + second argument to build_common_tree_nodes to + track r233218. + 2016-01-23 Iain Buclaw * jit-playback.c: In

[PATCH] PR other/69554: avoid excessive source printing for widely-separated locations

2016-02-09 Thread David Malcolm
PR other/69554 describes a regression seen from the Fortran frontend when issuing a diagnostic containing more than one location: if the locations are within the same file (and hence not filtered by the existing sanitization code), diagnostic_show_locus could print all of the lines of the source fi

Re: [PATCH] PR driver/69265: improved suggestions for various misspelled options

2016-02-09 Thread David Malcolm
e* running into this. On Wed, 2016-01-13 at 16:50 -0500, David Malcolm wrote: > As of r230285 (b279775faf3c56b554ecd38159b70ea7f2d37e0b; PR > driver/67613) > the driver provides suggestions for misspelled options. > > This works well for some options e.g. > > $ gcc -static-li

Re: [patch] Fix timevar internal consistency failure

2016-02-10 Thread David Malcolm
On Wed, 2016-02-10 at 15:15 +0100, Michael Matz wrote: > Hi, > > On Wed, 10 Feb 2016, Richard Biener wrote: > > > > The problem is that TV_PHASE_DBGINFO is now nested within > > > TV_PHASE_OPT_GEN, which violates the above mutual exclusivity > > > requirement. Therefore the attached patch simp

Re: [PATCH, stage1] Better error recovery for merge-conflict markers

2016-02-10 Thread David Malcolm
On Mon, 2016-02-08 at 10:07 +0100, Bert Wesarg wrote: > David, > > On Thu, Apr 9, 2015 at 10:29 AM, Bert Wesarg < > bert.wes...@googlemail.com> wrote: > > Hi David, > > > > > Various tools that operate on source code files will inject > > > markers > > > into them when an unfixable conflict occur

[PATCH] PR driver/69265 and 69453: improved suggestions for various misspelled options

2016-02-10 Thread David Malcolm
On Wed, 2016-02-10 at 17:25 +0100, Bernd Schmidt wrote: > On 02/09/2016 09:44 PM, David Malcolm wrote: > > This is a bug in a new feature, so it isn't a regression as such, > > but > > it's fairly visible, and I believe the fix is relatively low-risk > > (er

[PATCH] PR plugins/69758: add params.list to PLUGIN_HEADERS

2016-02-10 Thread David Malcolm
params.h is listed in PLUGIN_HEADERS. As of r227566 params.h #includes params.list, but the latter is not in PLUGIN_HEADERS, leading to compilation failure for plugins that include params.h e.g. for gcc-python-plugin: In file included from gcc-cfg.c:40:0: /install-dogfood/lib/gcc/x86_64-pc-l

[PATCH] [wwwdocs] Add a "Plugin issues" section to the GCC 6 porting guide

2016-02-11 Thread David Malcolm
I've (mostly) ported gcc-python-plugin to gcc 6. The attached patch for the gcc website starts a new "Plugin issues" section, and covers the biggest issue I ran into (FWIW the suggested compatibility typedef is the one I committed to gcc-python-plugin). Validates. OK to commit?Index: htdocs/gcc-

Re: [PATCH] PR driver/69265: improved suggestions for various misspelled options

2016-02-11 Thread David Malcolm
On Thu, 2016-02-11 at 10:16 +0100, Richard Biener wrote: > On Wed, Feb 10, 2016 at 5:25 PM, Bernd Schmidt > wrote: > > On 02/09/2016 09:44 PM, David Malcolm wrote: > > > > > > This is a bug in a new feature, so it isn't a regression as such, > > > but

[PATCH] PR driver/69779: fix bogus cleanup code used by libgccjit affecting s390x

2016-02-11 Thread David Malcolm
In r227188 I introduced driver::finalize () which resets all state within gcc.c, allowing the driver code to embedded inside libgccjit and run repeatedly in-process. Running this on s390x revealed a bug in this cleanup: I was cleaning up "specs" via: XDELETEVEC (specs); and this wa

Re: [PATCH] PR driver/69779: fix bogus cleanup code used by libgccjit affecting s390x

2016-02-12 Thread David Malcolm
On Fri, 2016-02-12 at 00:51 -0700, Jeff Law wrote: > On 02/11/2016 10:12 PM, David Malcolm wrote: > > In r227188 I introduced driver::finalize () which resets > > all state within gcc.c, allowing the driver code to embedded > > inside libgccjit and run repeatedly in-process.

Re: [PATCH] PR other/69554: avoid excessive source printing for widely-separated locations

2016-02-12 Thread David Malcolm
On Fri, 2016-02-12 at 11:25 -0700, Jeff Law wrote: > On 02/09/2016 01:54 PM, David Malcolm wrote: > > > gcc/ChangeLog: > > PR other/69554 > > * diagnostic-show-locus.c (struct line_span): New struct. > > (layout::get_first_line): Delete. > >

[PING] Re: [PATCH] [wwwdocs] Add a "Plugin issues" section to the GCC 6 porting guide

2016-02-18 Thread David Malcolm
Ping: https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00765.html On Thu, 2016-02-11 at 10:12 -0500, David Malcolm wrote: > I've (mostly) ported gcc-python-plugin to gcc 6. The attached patch > for the gcc website starts a new "Plugin issues" section, and covers > the

Re: [PATCH] Add debug_function_to_file

2016-02-18 Thread David Malcolm
On Thu, 2016-02-18 at 18:26 +0100, Tom de Vries wrote: > On 18/02/16 16:43, Tom de Vries wrote: > > On 18/02/16 16:27, Richard Biener wrote: > > > > > > I would be nice if we could avoid the ${1,2,3} printouts > > > > > > and value > > > > > > > > > > history > > > > > > > > > > assignments, but I'

[PATCH 2/2] PR preprocessor/69126: avoid comparing ad-hoc and non-ad-hoc locations

2016-02-20 Thread David Malcolm
Comment #18 of PR preprocessor/69126 reported a difficult-to-reproduce re-occurrence of that bug, where attempts to suppress -Wdeprecated-declarations via a _Pragma could fail. The root cause is a bug in linemap_compare_locations when comparing certain macro expansions with certain non-macro exp

[PATCH 1/2] RFC: Add test coverage for _Pragma (PR preprocessor 69126, 69543, 69558)

2016-02-20 Thread David Malcolm
We had some regressions in the ability for _Pragma to disable a warning (PR preprocessor/69126, PR preprocessor/69543, PR preprocessor/69558). This patch attempts to add more test coverage for this, for the various combinations of: - various warnings: -Wunused-variable -Wuninitialized

Re: [PATCH] Fix Bug 17896: The expression (a>0 & b>0) should give clearer warning message (-Wparentheses)

2016-02-20 Thread David Malcolm
On Sat, 2016-01-30 at 19:05 +0530, Prasad Ghangal wrote: > Hi! > > This is my first proposed patch for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17896. I was willing to > do it using "APPEARS_TO_BE_BOOLEAN_EXPR_P(CODE, ARG)" to check > booleans but gcc doesn't allow (bootstraping fails). Henc

Re: [PATCH] Do not gather mem stats in run_exit_handles (PR middle-end/69919)

2016-02-25 Thread David Malcolm
On Thu, 2016-02-25 at 12:07 +0100, Martin Liška wrote: > Hello. > > As discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69919#c3 > , following patch > guards usage of memory statistics infrastructure after a > mem_alloc_description is already > destructed. > > Patch can lto-bootstrap on

[PING^2] Re: [PATCH] [wwwdocs] Add a "Plugin issues" section to the GCC 6 porting guide

2016-02-26 Thread David Malcolm
Ping On Thu, 2016-02-18 at 10:44 -0500, David Malcolm wrote: > Ping: > https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00765.html > > > On Thu, 2016-02-11 at 10:12 -0500, David Malcolm wrote: > > I've (mostly) ported gcc-python-plugin to gcc 6. The attached > &g

[committed] PR preprocessor/69985: fix ICE with long lines in -Wformat

2016-02-29 Thread David Malcolm
PR preprocessor/69985 reports an ICE due to the failure of: linemap_assert_fails (map == linemap_lookup (set, r))) The root cause seems to be the range-packing optimization I added in r230331; it looks like I forgot to update linemap_position_for_loc_and_offset accordingly. Sorry. The followi

[PATCH] PR c/69993: improvements to wording of -Wmisleading-indentation

2016-03-01 Thread David Malcolm
The wording of our output from -Wmisleading-indentation is rather confusing, as noted by Reddit user "sysop073" here: https://www.reddit.com/r/programming/comments/47pejg/gcc_6_wmisleadingindentation_vs_goto_fail/d0eonwd > The way they split up the warning looks designed to trick you. > sslKeyEx

[wwwdocs] [PATCH] Add "id" attributes to the headings in the GCC 6 porting guide

2016-03-01 Thread David Malcolm
htdocs/gcc-6/porting_to.html is now multiple screens of text. The attached patch adds "id" attributes to every h2, h3 and h4 element in the page, so that people can create URLs that reference specific subsections of the guide. Validates. OK to commit?Index: htdocs/gcc-6/porting_to.html =

Re: [wwwdocs] [PATCH] Add "id" attributes to the headings in the GCC 6 porting guide

2016-03-02 Thread David Malcolm
On Wed, 2016-03-02 at 00:10 +0100, Gerald Pfeifer wrote: > Hi David, > > On Tue, 1 Mar 2016, David Malcolm wrote: > > The attached patch adds "id" attributes to every h2, h3 and h4 > > element > > in the page, so that people can create URLs that reference

[PATCH 2/2] PR c/68187: fix overzealous -Wmisleading-indentation (comment #1)

2016-03-03 Thread David Malcolm
Comment #1 of PR c/68187 identified another overzealous warning from -Wmisleading-indentation, with OpenSSL 1.0.1, on this poorly indented code: 115if (locked) 116i = CRYPTO_add(&e->struct_ref, -1, CRYPTO_LOCK_ENGINE); 117else 118i = --e->struct_ref; 119engine_ref_debug

[PATCH 1/2] PR c/68187: fix overzealous -Wmisleading-indentation (comment #0)

2016-03-03 Thread David Malcolm
PR c/68187 covers two cases involving poor indentation where the indentation is arguably not misleading, but for which -Wmisleading-indentation emits a warning. The two cases appear to be different in nature; one in comment #0 and the other in comment #1. Richi marked the bug as a whole as a P1 r

Re: [PATCH 1/2] PR c/68187: fix overzealous -Wmisleading-indentation (comment #0)

2016-03-03 Thread David Malcolm
On Thu, 2016-03-03 at 10:24 -0500, Patrick Palka wrote: > On Thu, Mar 3, 2016 at 10:21 AM, David Malcolm > wrote: > > PR c/68187 covers two cases involving poor indentation where > > the indentation is arguably not misleading, but for which > > -Wmisleading-ind

Re: [PING] genattrab.c generate switch

2016-03-04 Thread David Malcolm
On Thu, 2016-03-03 at 17:36 -0500, Patrick Palka wrote: > On Thu, Mar 3, 2016 at 4:29 PM, Jesper Broge Jørgensen > wrote: > > > > On 18/02/16 13:22, Bernd Schmidt wrote: > > > > > > On 01/19/2016 12:47 PM, Jesper Broge Jørgensen wrote: > > > > > > > > Here is the reformatted patch: > > > > > >

Re: [PATCH] Fix checking of gimple types

2013-11-26 Thread David Malcolm
On Mon, 2013-11-25 at 12:34 -0700, Jeff Law wrote: > On 11/25/13 08:35, David Malcolm wrote: > > > > I'm not a fan of these "_layout" names, but I'm not sure what better to > > call them. Perhaps: > > GSS_OMP_PARALLEL_LAYOU

[PATCH] Fix missing plugin headers

2013-12-03 Thread David Malcolm
rg/cgit/gcc-python-plugin.git/commit/?id=903202a97f30f1cf10e4c57b70c31894f0c2cc97 (posting here since it might be helpful to other plugins). commit 022bcca7a42be2cb794d378691b2044edc424e0d Author: David Malcolm Date: Mon Dec 2 14:45:35 2013 -0500 Add missing headers to PLUGIN_HEADERS gcc/

[PATCH 02/13] Rename last_basic_block_for_function to last_basic_block_for_fn.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (last_basic_block_for_function): Rename to... (last_basic_block_for_fn): ...this. * ipa-utils.c (ipa_merge_profiles): Update for renaming of last_basic_block_for_function to last_basic_block_for_fn. * lto-streamer-in.c (input_cfg): Likewi

[PATCH 12/13] Eliminate FOR_EACH_BB_REVERSE macro.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (FOR_EACH_BB_REVERSE): Eliminate macro. * cfghooks.c (verify_flow_info): Replace uses of FOR_EACH_BB_REVERSE with FOR_EACH_BB_REVERSE_FN, making uses of cfun explicit. * cfgrtl.c (print_rtl_with_bb, rtl_verify_edges, rtl_verify_bb_insns,

[PATCH 00/13] Remove remaining cfun-using macros from basic-block.h

2013-12-06 Thread David Malcolm
FOR_EACH_BB FOR_EACH_BB_REVERSE \ FOR_ALL_BB ; do grep -nH -E -w $m \ gcc/*.[ch] gcc/config/*.[ch] gcc/config/*/*.{c,h,md} ; done (this currently has 11 false-positives) [1] with one exception, in patch 10 in gcc/ira-emit.c (ira_emit) where I introduced a new local t

[PATCH 03/13] Rename label_to_block_map_for_function to label_to_block_map_for_fn.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (label_to_block_map_for_function): Rename to... (label_to_block_map_for_fn): ...this. * lto-streamer-in.c (input_cfg): Update for renaming. * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise. --- gcc/basic-block.h | 2 +- gcc/lto-stre

[PATCH 01/13] Rename macros (basic_block_info_for_function, BASIC_BLOCK_FOR_FUNCTION, SET_BASIC_BLOCK_FOR_FUNCTION)

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (basic_block_info_for_function): Rename to... (basic_block_info_for_fn): ...this. (BASIC_BLOCK_FOR_FUNCTION): Rename to... (BASIC_BLOCK_FOR_FN): ...this. (SET_BASIC_BLOCK_FOR_FUNCTION): Rename to... (SET_BASIC_BLOCK_FOR_FN): ...th

[PATCH 05/13] Eliminate SET_BASIC_BLOCK macro.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (SET_BASIC_BLOCK): Eliminate macro. * cfg.c (compact_blocks): Replace uses of SET_BASIC_BLOCK with SET_BASIC_BLOCK_FOR_FN, making use of cfun explicit. (expunge_block): Likewise. * cfgrtl.c (create_basic_block_structure): Likewise.

[PATCH 07/13] Eliminate basic_block_info macro.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (basic_block_info): Eliminate macro. * cfgrtl.c (rtl_create_basic_block): Replace uses of basic_block_info with basic_block_info_for_fn, making uses of cfun be explicit. * tree-cfg.c (build_gimple_cfg, create_bb): Likewise. --- gcc/basi

[PATCH 04/13] Rename profile_status_for_function to profile_status_for_fn.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (profile_status_for_function): Rename to... (profile_status_for_fn): ...this. * cfg.c (check_bb_profile): Update for renaming. * cgraphbuild.c (compute_call_stmt_bb_frequency): Likewise. * lto-streamer-in.c (input_cfg): Likewise.

[PATCH 08/13] Eliminate label_to_block_map macro.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (label_to_block_map): Eliminate macro. * gimple.c (gimple_set_bb): Replace uses of label_to_block_map with uses of label_to_block_map_for_fn, making uses of cfun be explicit. * tree-cfg.c (delete_tree_cfg_annotations): Likewise.

[PATCH 09/13] Eliminate profile_status macro.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (profile_status): Eliminate macro. * cfgbuild.c (find_many_sub_basic_blocks): Eliminate use of profile_status macro in favor of profile_status_for_fn, making use of cfun explicit. * cfghooks.c (account_profile_record): Likewise.

[PATCH 13/13] Eliminate FOR_ALL_BB macro.

2013-12-06 Thread David Malcolm
gcc/ * basic-block.h (FOR_ALL_BB): Eliminate macro. * cfg.c (alloc_aux_for_blocks, clear_aux_for_blocks): Replace uses of FOR_ALL_BB with FOR_ALL_BB_FN, making uses of cfun explicit. * cfganal.c (inverted_post_order_compute): Likewise. * cfgcleanup.c (try_o

Re: [PATCH 10/13] Eliminate last_basic_block macro.

2013-12-09 Thread David Malcolm
On Fri, 2013-12-06 at 21:27 +0100, Richard Biener wrote: > Oleg Endo wrote: > >On Fri, 2013-12-06 at 16:57 +0100, Steven Bosscher wrote: > >> On Fri, Dec 6, 2013 at 3:51 PM, David Malcolm wrote: > >> > * asan.c (transform_statements): Eliminate use of > &g

<    4   5   6   7   8   9   10   11   12   13   >