This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] explicitly specify -std=gnu89 for gdb.cp/inline-break.exp
- From: Pedro Alves <palves at redhat dot com>
- To: David Blaikie <dblaikie at gmail dot com>
- Cc: Andrew Pinski <pinskia at gmail dot com>, gdb-patches <gdb-patches at sourceware dot org>, Eric Christopher <echristo at gmail dot com>, Doug Evans <dje at google dot com>
- Date: Thu, 01 May 2014 11:52:11 +0100
- Subject: Re: [patch] explicitly specify -std=gnu89 for gdb.cp/inline-break.exp
- Authentication-results: sourceware.org; auth=none
- References: <CAENS6EsUSQTajixKzmStvX9KrG-8SaTA=YVO=6MFMpY35Um9FQ at mail dot gmail dot com> <CA+=Sn1mZHq=_kvEB8v68dd==m11wLsR0N0cQ1-6q7y5EYR24LQ at mail dot gmail dot com> <CAENS6EsjGe7e6M987QPFjabnJWAGMd45XvhzDgTTthK_FojN_g at mail dot gmail dot com>
On 04/13/2014 08:08 AM, David Blaikie wrote:
> On Fri, Apr 11, 2014 at 7:59 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> On Fri, Apr 11, 2014 at 4:58 PM, David Blaikie <dblaikie@gmail.com> wrote:
>>> This test is intending to use gnu style inline rather than the
>>> standard c99 inline semantics. Clang defaults to c99 and the test
>>> breaks for this (and other - there's an inlining debug info quality
>>> bug here too - I'll file a bug and kfail the remaining failures in a
>>> separate patch) reason.
>>
>> Or better yet, use the gnu_inline attribute on those functions.
>
> Ah, good plan - patch attached for that fix instead.
>
> Though at this point, I'd consider removing the GNUC conditional - for
> this test to be meaningful the compiler must support gnu inlining
> semantics. Are there compilers that support those semantics but don't
> support GCC attribute syntax and the gnu_inline attribute in
> particular?
A web search indicates IBM's xlc supports it:
http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.cbclx01%2Ffn_attrib_gnu_inline.htm
(and always_inline too.)
And I know ARM's compiler supports it too.
If there's such a compiler, we can readjust.
The patch is OK.
> Removing the conditional would cause any compiler that doesn't support
> the attributes to just fail to compile, marking the test as untested
> rather than producing failures.
That'd be fine, I think. In fact, it might even make the test work
under xlc... (no idea of people actually test that). That change
is pre-approved (but please do make it a separate change).
Although the test as is requires gnu semantics, we're really after
making sure that setting breakpoints in inline functions work.
We should probably test all off gnu inline semantics, c99
semantics, and also c++ semantics too.
--
Pedro Alves