[cfe-dev] Test suite additions request
Charles Davis
cdavis at mymail.mines.edu
Sun Sep 4 16:04:52 PDT 2011
On Sep 4, 2011, at 4:51 PM, Eli Friedman wrote:
> On Sun, Sep 4, 2011 at 3:38 PM, Philip Ashmore
> <contact at philipashmore.com> wrote:
>> Hi there.
>>
>> I'm writing this in the hope that my projects could find their way into
>> some clang test suite.
>>
>> I've got several packages in SourceForge: v3c, treedb, meta-treedb are
>> the ones relevant here.
>> Each builds on the one before, a kind of software stack.
>>
>> Because I'm (or rather gcc/g++ 4.6) is having problems,
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630441
>> "g++-4.6 miscompilation", I've started to explore other compilers to
>> find out more.
>>
>> The first thing I noticed was that clang(++) isn't flag-for-flag
>> compatible with gcc/g++ -
>> there's no -dD to list the preprocessor symbols hard-wired into the
>> compiler.
>> I figured out from web pages that I could check for __clang__.
>
> clang supports -dM. Haven't seen anyone use -dD.
-dD works. You just have to pass the right command line arguments. Something like this:
clang -dD -E -xc /dev/null
>
>> Next I noticed that clang(++) doesn't support __attribute__((ms_abi)),
>> gcc's way of saying Pascal calling
>> convention, in which the callee pops the stack - I think my code is
>> smaller and faster with it.
>
> Hmm... could be useful, I guess (although I can't imagine it's
> substantially faster); feel free to file at llvm.org/bugs/
I already filed PR9148 (http://llvm.org/PR9148). With some projects, it's not only useful; it's required. Wine on 64-bit needs this to work at all, for example.
Chip
More information about the cfe-dev
mailing list