[mythtv] [mythtv-commits] Ticket #5693: time_t var brokenDown might want to init tm_gmtoff and tm_zone

Daniel Kristjansson danielk at cuymedia.net
Thu Dec 25 13:55:48 UTC 2008


On Wed, 2008-12-24 at 21:47 +0000, MythTV wrote:
> Comment(by Erik Hovland <erik at hovland.org>):
>  I hear you. But this is a C++ issue. Just look on the intertubes for gcc
>  and sentinel warnings.

Heh, it's only been introduced as a warning since the C++0x committee
introduced the "nullptr" concept, just consider that compiler warning
as empty political gesturing. In C and C++ "0" has always been a valid
value to set any pointer, but that made life difficult for compiler
writers since (if you treat that token as the number zero) it introduces
a bunch of implicit casts which are otherwise illegal in C and C++.
C compilers cheated by casting 0 to (void*) in the NULL macro, but
C++ doesn't normally allow the void* to anything cast implicit cast,
so null pointer initialization requires special case code in modern
type strict C++ compilers. But even in C++0x "0" and "NULL" will be
retained as means to initialize a pointer, and they are certainly should
not result in warnings in any standards compliant C++ compiler until
after C++0x is finalized and an acceptable alternative is available.

-- Daniel



More information about the mythtv-dev mailing list