From: Richard Sandiford <richard.sandiford@linaro.org>
To: Pedro Alves <palves@redhat.com>
Cc: Tom de Vries <Tom_deVries@mentor.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>,
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
Mike Stump <mikestump@comcast.net>
Subject: Re: [RFC] Dejagnu patch to handle multi-line directives
Date: Tue, 13 Jun 2017 06:59:00 -0000 [thread overview]
Message-ID: <87bmpsfk4v.fsf@linaro.org> (raw)
In-Reply-To: <f67b9eaa-d220-0121-770c-5fe939807b8b@redhat.com> (Pedro Alves's message of "Mon, 12 Jun 2017 19:54:41 +0100")
Pedro Alves <palves@redhat.com> writes:
> On 06/12/2017 08:59 AM, Richard Sandiford wrote:
>> I realise there's probably more that can go wrong with it, but how
>> about instead treating unbalanced { ... } as a sign that the directive
>> continues to the next line? This would allow:
>>
>> /* { dg-additional-options
>> "-DSTACK_SIZE=[dg-effective-target-value stack_size]"
>> { target { stack_size } } } */
>
> In a TCL .exp file you'd split the lines with a '\' continuation
> character. Wouldn't that be more natural? Like:
>
> /* { dg-additional-options \
> "-DSTACK_SIZE=[dg-effective-target-value stack_size]" \
> { target { stack_size } } } */
It'd be more normal to omit \ in a braced list though, so I think
the version without is more natural Tcl style.
> Might be less magical and simpler to implement too.
The reason I avoided \ was because it's a "native" continuation marker
for C and C++, but not for Fortran, Ada and others. So using \ would
change the way the comment is treated by some front ends and not others.
E.g. things like:
// a \
// b
trigger:
warning: multi-line comment [-Wcomment]
(Maybe moot anyway given Mike's response.)
Thanks,
Richard
next prev parent reply other threads:[~2017-06-13 6:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 7:57 Tom de Vries
2017-06-10 8:03 ` Tom de Vries
2017-06-11 0:42 ` Segher Boessenkool
2017-06-12 7:59 ` Richard Sandiford
2017-06-12 18:54 ` Pedro Alves
2017-06-13 6:59 ` Richard Sandiford [this message]
2017-06-12 16:58 ` Mike Stump
2017-06-20 13:28 ` Rainer Orth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmpsfk4v.fsf@linaro.org \
--to=richard.sandiford@linaro.org \
--cc=Tom_deVries@mentor.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=mikestump@comcast.net \
--cc=palves@redhat.com \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).