This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [gdb/testsuite] Move start-of-function brace to handle Clang/GCC difference
- From: David Blaikie <dblaikie at gmail dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 24 Apr 2014 13:20:24 -0700
- Subject: Re: [patch] [gdb/testsuite] Move start-of-function brace to handle Clang/GCC difference
- Authentication-results: sourceware.org; auth=none
- References: <CAENS6Ev3-fbm4P++YZ3o6Q2nFV_SjSgWTpc12uvZ4ui-qRsnYA at mail dot gmail dot com> <21336 dot 14031 dot 213796 dot 45825 at ruffy dot mtv dot corp dot google dot com>
On Wed, Apr 23, 2014 at 2:55 PM, Doug Evans <dje@google.com> wrote:
> David Blaikie writes:
> > gdb.cp/cpexprs.exp is verifying behavior that's likely a GCC bug (GCC
> > PR60815 and some in person and IRC conversations with GCC developers).
> > GCC inconsistently places the prologue on either the line with the
> > function name or the line with the function's open brace. Clang
> > consistently uses the function's open brace.
> >
> > Either these tests can be fixed by moving the line to break on and
> > XFAILing them all under GCC, or just making the test neutral to the
> > bug by moving the brace. I generally think it's best to just make the
> > test bug-neutral.
> >
> > I've also had to update the .exp file to tolerate differences in the
> > type of vtable pointers (GCC's "const void ** const" versus Clang's
> > "void **") which required some refactoring.
> > commit c532bc93335823e6ddbaa58abe6f5f58a1dda62e
> > Author: David Blaikie <dblaikie@gmail.com>
> > Date: Sun Apr 13 17:37:56 2014 -0700
> >
> > Adjust start-of-function braces to be compatible with Clang
> >
> > gdb/testsuite/
> > * gdb.cp/cpexprs.cc: Move braces to the same line as the start
> > of the function to work across GCC and Clang.
> > * gdb.cp/cpexprs.exp: Account for GCC/Clang difference in vtable
> > pointer types (const void ** const V void **).
>
> I'm don't have an opinion, so in the interests of moving things along,
> and since the patch has been out for awhile,
> let's go with this.
>
> When you commit this, *please* add the entirety of the above text to the commit entry.
>
> Thanks!
Committed in 25d4e99db83ba758e3c888d321b9f2f7845701a0
Thanks Doug!