[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Bog om C



Egon Andersen <sslug@sslug> skrev den 13-May-04:

> (At PostgrsSQL så ikke overholder C99-standarden er sagen uvedkommende.)

Der kan være argumenter, som taler for at anvende en
ikke-standardiseret metode. Eksempelvis at programmet ønskes oversat
af de compilere, man nu engang har adgang til.

Jeg har i den sammenhæng forstået at

    typedef struct {
           char v[1];
    } T;

    T* p = malloc(sizeof(T) + x);

er marginalt mindre portabelt end

    typedef struct {
           char v[10000];
    } T;

    T* p = malloc((sizeof(T) - sizeof(T.v) + 1) + x);

hvor man gør sit array for stort i stedet for at gøre det for småt.


Anders.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *