DRAFT document on coding conventions in kde libraries

Thiago Macieira thiago at kde.org
Tue Mar 7 20:12:59 GMT 2006


Leo Savernik wrote:
>Compiled with gcc-2.95.2 (yes, really old version!) results in:
>a: 0x8049fb8 b: 0x8049fb0 a==b: 1
>
>So I can't follow your concern. Whatever, msvc6 doesn't even compile
> this.

Ok, there's some trickery there.

But I know gcc 2.95 can't comply with adjusting covariant returns in some 
cases, at least. I know because I wanted to do just that for 
KNetwork::KServerSocket::accept, but I couldn't. I was using gcc 2.95 at 
the time and it generated an internal error.

You can still see the warning there:
http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kdecore/html/classKNetwork_1_1KServerSocket.html#a19

   * @note This function should return a KStreamSocket object, but 
compiler
   *       deficiencies prevent such an adjustment. Therefore, we return
   *       the base class for active sockets, but it is guaranteed
   *       that the object will be a KStreamSocket or derived from it.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

2. Tó cennan his weorc gearu, ymbe se circolwyrde, wearð se cægbord and se 
leohtspeccabord, and þa mýs cómon lator. On þone dæg, he hine reste.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060307/46a2da0c/attachment.sig>


More information about the kde-core-devel mailing list