This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix up COMPLEX_EXPR pretty-printing (PR c++/35334)


2008/11/11 Jakub Jelinek <jakub@redhat.com>:
> On Tue, Nov 11, 2008 at 03:24:11PM +0100, Manuel López-Ibáñez wrote:
>> 2008/11/11 Jakub Jelinek <jakub@redhat.com>:
>> > On Tue, Nov 11, 2008 at 03:09:00PM +0100, Manuel López-Ibáñez wrote:
>> >> These testcases (and the C++ ones) would work with or without your
>> >> patch, wouldn't they?
>> >
>> > That's true, but it is something that has been done for all the
>> > "not supported by" testcases I remember during last few years.
>> > I don't think we should match the exact spelling of the diagnostics,
>> > that keeps changing over time.  Perhaps just ensure
>> > "not supported by" isn't matched on any line.
>>
>> I am of the opinion that changes of spelling are easily updated with a
>> bit of regexp magic and such precise testcases allow to detect
>> duplicated testcases and subtler bugs. But I know the general opinion
>> is different. So I guess that ensuring that the not supported isn't
>> matched would be enough.
>
> But how do you do that?
>
>  ((__complex__ int)i)();               // { dg-error "cannot be used as a function" }
> ...
> // { dg-bogus "not supported by" "" { target *-*-* } 14 }
> (where the line number corresponds to the dg-error line) doesn't work,
> dg-error already prunes the diagnostic message and so dg-bogus
> doesn't match.
>

If I understand correctly, that dg-bogus wouldn't match the "not
supported by" anyway because it doesn't follow the typical "line:
pattern" format. You should try to put:

// { dg-bogus "not supported by" "" { target *-*-* } 0 }

near the start of the testcase.

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]