[lkml]   [2003]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: GCC 3.4 Heads-up
    Date writes:

    > Or consider the case when the structure doesn't have an explicit size
    > and you have a big case statement for parsing it:
    > switch (a->type) {
    > case BAR:
    > process_bar_chunk(((struct bar *)a)++);
    > break;
    > case BAZ:
    > process_baz_chunk(((struct baz *)a)++);
    > break;
    > ...
    > };
    > Isn't that code a bit nicer looking? I put the redundant parens

    Except that the parens are not redundant.

    > in to remind people that I didn't mean to write "(struct bar *)(a++)"
    > (which also has its legitimate uses).

    Which is why it's parsed this way by default.


    Andreas Schwab, SuSE Labs,
    SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
    Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
    "And now for something completely different."
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:59    [W:0.029 / U:4.268 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site