[LLVMdev] lit: deprecating trailing \ in RUN lines
Alp Toker
alp at nuanti.com
Tue Dec 10 13:53:09 PST 2013
On 10/12/2013 21:43, Caldarale, Charles R wrote:
>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
>> On Behalf Of Alp Toker
>> Subject: Re: [LLVMdev] lit: deprecating trailing \ in RUN lines
>> //\
>> int x=0;
>> int x=0;
>> $ gcc-4.9 -fsyntax-only f.c
> Try gcc with -Wall, and you'll see the appropriate warning. Also try the MS compiler after removing the trailing space after the backslash; I don't have one available to play with, so I don't know if it makes any difference.
Exactly. EDG and MSVC parse this one way, and gcc/clang do it another
way depending on various factors like whitespace.
It may be a bug like Jim says but to me the EDG/MSVC handling is closer
to the spec. Not a big deal either way.
For directives in a C/C++ test suite to rely on something contentious
like trailing newlines that have a dual meaning depending on whether
they're being parsed by the compiler or the testing tool is problematic
though.
Alp.
>
> - Chuck
>
--
http://www.nuanti.com
the browser experts
More information about the llvm-dev
mailing list