[EMAIL PROTECTED] writes:
> But "-ffreestanding" doesn't work with C++.

While the C++ standard does define hosted and freestanding
implementations, its definition is different from (and less useful
than) that in the C standard.  For instance, the C++ standard requires
the existence of abort(), atexit() and exit() even in a freestanding
implementation.

Basically, one cannot indiscriminately use the same compiler flags for
C and C++, because they are very different languages - far more
different than they seem on the surface.  Modern C++ is very poorly
suited for low-level code.

> According to above explanation, "-fno-builtin" is a subset of
> "-ffreestanding" and it's enough for kernel.

No, it isn't.  I think you would do wisely to acquire a little more
knowledge of and experience with C, C++ and kernel programming before
you pursue this topic any further.

Most importantly, we already have an working object model in the
FreeBSD kernel, with classes, inheritance, and all that jazz,
implemented partly in C and partly in a custom IDL which is translated
into C by src/sys/tools/makeobjops.awk.

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to