[lkml]   [1999]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: fork() Problem?
    On May 05, Richard B. Johnson wrote:

    > On Wed, 5 May 1999, Manuel A. McLure wrote:
    > > This is *not* a bug. lint is WARNING you (caps mine) that this may have
    > > different results than expect. But the functionality behind the expression
    > > is a C design feature that has been there since day one. Any compiler that
    > > DOES execute the inside of the if() statement in the code you present would
    > > be buggy.
    > >
    > > --
    > > Manuel A. McLure KE6TAW <>
    > Lint _clearly_ states that it's an error.

    congratulation, you found a bug in lint;)

    or just think that it's an `error' in lint's mind to write such ugly code
    (which looks like Pascal code;) -- but lint's mind and lint itself isn't part
    of the C language standard.

    > That said, the problem with:
    > if(a=b)
    > is that the value of a is not tested. 'a' got assigned the value of
    > 'b', but only the assignment was tested, not the resulting value.

    can you please explain what `assignment was tested' means in C language ?
    and an you please show where K&R or ANSI C explain what it means that
    an `assignment (does not) succeed' and how this ever shall happen ?

    does this test check if the value already was stored ?
    was stored in main memory? stored in L2 cache? in L1 cache?
    in a register variable ?!

    and how ever should such a test, if a value got stored, fail in C ?
    do you expect to read back memory (register, cache, ...) and compare
    it with the original value to be stored ?!

    All SCSI disks will from now on ___ _____
    be required to send an email notice 0--,| /OOOOOOO\
    24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
    Harald Koenig, \/\/\/\/\/\/\/\/\/
    Inst.f.Theoret.Astrophysik // / \\ \ ^^^^^ ^^^^^

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

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