lkml.org 
[lkml]   [2007]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/9] remove volatile keyword from clflush.
    Glauber de Oliveira Costa wrote:
    > the p parameter is an explicit memory reference, and is
    > enough to prevent gcc to being nasty here. The volatile
    > seems completely not needed.
    >

    The usual reason for these types of "volatiles" is to make type checking
    happier, since "volatile void *" is compatible with any argument you
    might pass. IOW, if you pass a plain "char *" then the compiler will
    promote it to "volatile char *" and not complain, and passing an already
    volatile pointer will be OK too.

    The volatile isn't there to modify the generated code in any way.

    J


    \
     
     \ /
      Last update: 2007-12-06 22:13    [W:0.020 / U:3.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site