Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-21 Thread David Edelsohn
On Sat, Nov 21, 2015 at 3:00 PM, David Malcolm wrote: > On Sat, 2015-11-21 at 13:54 -0500, David Edelsohn wrote: >> On Tue, Nov 17, 2015 at 3:12 PM, David Malcolm wrote: >> > On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: >> >> On 11/17/2015 04:13 PM, David Malcolm wrote: >> >> > On Mon,

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-21 Thread David Malcolm
On Sat, 2015-11-21 at 13:54 -0500, David Edelsohn wrote: > On Tue, Nov 17, 2015 at 3:12 PM, David Malcolm wrote: > > On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: > >> On 11/17/2015 04:13 PM, David Malcolm wrote: > >> > On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: > >> >> > >>

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-21 Thread David Edelsohn
On Tue, Nov 17, 2015 at 3:12 PM, David Malcolm wrote: > On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: >> On 11/17/2015 04:13 PM, David Malcolm wrote: >> > On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: >> >> >> >> Should c_expr perhaps acquire a constructor so that this problem

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-17 Thread David Malcolm
On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: > On 11/17/2015 04:13 PM, David Malcolm wrote: > > On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: > >> > >> Should c_expr perhaps acquire a constructor so that this problem is > >> avoided in the future? The whole thing seems somewhat

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-17 Thread Bernd Schmidt
On 11/17/2015 04:13 PM, David Malcolm wrote: On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: Should c_expr perhaps acquire a constructor so that this problem is avoided in the future? The whole thing seems somewhat error-prone. I agree that it's error prone, and the ctor approach is w

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-17 Thread David Malcolm
On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: > On 11/16/2015 09:50 PM, David Malcolm wrote: > > The root cause is uninitialized data. Specifically, the C parser's > > struct c_expr gained a "src_range" field, and it turns out there are a > > few places where I wasn't initializing this w

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-16 Thread Bernd Schmidt
On 11/16/2015 09:50 PM, David Malcolm wrote: The root cause is uninitialized data. Specifically, the C parser's struct c_expr gained a "src_range" field, and it turns out there are a few places where I wasn't initializing this when returning c_expr instances on the stack, and in some cases the v

[PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-16 Thread David Malcolm
On Sat, 2015-11-14 at 23:32 -0500, David Malcolm wrote: > On Sat, 2015-11-14 at 09:50 -0500, David Edelsohn wrote: > > This patch causes numerous new testsuite failure on AIX caused by the > > compiler crashing during compilation, e.g. > > > > gcc.c-torture/execute/20020206-1.c > > > > in GCC lib

Re: libcpp/C FE source range patch committed (r230331).

2015-11-14 Thread David Malcolm
On Sat, 2015-11-14 at 09:50 -0500, David Edelsohn wrote: > This patch causes numerous new testsuite failure on AIX caused by the > compiler crashing during compilation, e.g. > > gcc.c-torture/execute/20020206-1.c > > in GCC libcpp > > 991 linemap_assert (line >= LINEMAPS_MACRO_LOWEST_LOCAT

Re: libcpp/C FE source range patch committed (r230331).

2015-11-14 Thread David Edelsohn
This patch causes numerous new testsuite failure on AIX caused by the compiler crashing during compilation, e.g. gcc.c-torture/execute/20020206-1.c in GCC libcpp 991 linemap_assert (line >= LINEMAPS_MACRO_LOWEST_LOCATION (set)); (gdb) where #0 _Z11fancy_abortPKciS0_ ( file=0x11296dc0