Re: [PATCH] C++ breaks on linux/ioport.h

From: Jes Sorensen (Jes.Sorensen@cern.ch)
Date: Fri Apr 28 2000 - 04:54:26 EST


>>>>> "Manfred" == Manfred Spraul <manfreds@colorfullife.com> writes:

Manfred> Alexander Viro wrote:
>> <shrug> basically, I couldn't care less for C++ - it has no
>> business seeing the internal kernel stuff and that's what
>> __KERNEL__ is for.
>>
Manfred> Why not?

Manfred> Someone might try to port a device driver that was written in
Manfred> C++ from another OS to Linux, and then this would be a
Manfred> problem.

Then you convert the device driver into proper C and the problem no
longer exists.

Manfred> We should not use "new" and "virtual" as variable names, and
Manfred> perhaps we should also add ".o.cpp" to Rules.mak and mkdep.

Of course we should, the Linux kernel is written in C.

Manfred> We don't need to support RTTI or exception handling, but IMHO
Manfred> we should not deliberately prevent C++ device drivers from
Manfred> compiling.

Making it easy to write C++ driver modules means somebody will do
it. Once somebody has done it, somebody else will try to use some of
the brain dread C++ features such as exceptions - therefore totally
preventing people from writing any bits of the kernel in C++ is a good
thing.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:14 EST