[LLVMdev] Convert C++ to C. What is 0x0p+0 ?

Mohd-Hanafiah Abdullah napi at axiomsol.com
Sun Nov 5 18:44:49 PST 2006


Hi:

I've been able to compile the attached "helloworld.c" file converted
from "helloworld.cpp".

My question is how does one usually use __main() and CODE_FOR_MAIN()
in tying up with the rest of the code?

Attached here are the original "helloworld.cpp" and "helloworld.c"
files.

Thanks.

Napi

On Sun, 2006-11-05 at 09:14 -0800, Reid Spencer wrote:
> Hi Napi,
> 
> On Sun, 2006-11-05 at 18:30 +0800, Mohd-Hanafiah Abdullah wrote:
> 
> > > The syntax in question is a C99 feature. It is printed by the C Backend
> > > with the %a conversion token for printf. This is the representation of a
> > > floating point number in hexadecimal. It allows certain values that
> > > cannot otherwise be represented with a decimal number to be represented.
> > > The C Backend needs to use this to ensure that the floating point value
> > > it has in mind is *exactly* represented through the conversion to the C
> > > source and then back by your C compiler.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: helloworld.cpp
Type: text/x-c++src
Size: 95 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061106/f0e8cce0/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: helloworld.c
Type: text/x-csrc
Size: 8631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061106/f0e8cce0/attachment.c>


More information about the llvm-dev mailing list