`> Lint _clearly_ states that it's an error.Lint can't say it's an Error. Read K&R and you find out it's perfectlyright. How else could expresiions like this work in C:a=b=c=0 ??If c=0 returns tru because the assignment worked (like in Pascal e.g.)then b would be 1 So you would have instead:a=1b=1c=0 But in "reality you get:a=0b=0c=0And if you read K&R then you see that the codeif (i=fork()) { /* Do something */ } else { /* Do something */ } isperfectly right C.If you don't need the return-value anymore you can also write:if (fork()) { /* Do something */ } else { /* Do something */ } This is perfect standard C as well.The difference between the two statements is that i got assigned thereturn-value of fork an the result of this assignment is the right sideof the =-assignment so this means the return-value of fork. So you seethe can be every value you like.If you don't believe it, I assume you begin learning C. There is a damngood book written by K&R. (I hope you know K&R the developer of theC-programming-language).> Further, previous text states why. Any time I point out these things> I get a bunch of fanatical "tool gurus" responding that I don't> know what I'm talking about.No the answers aren't fanatical. Perhaps you should learn the basicsbefore you build up such a mind which IS definatly wrong. You could evenlearn from the answers you get instead of saying "These idiots don'tknow what they are speaking about. I know everything so they can't beright. I am God!!!"Think about it.> The 'C' language is just a tool. It is not a religion. It is also> not a means unto itself. In the "real world", I don't give a damn> about what you can get away with while using such a tool.Yes, but you have to know the standards, what is allowed and what not.You can't write Pascal-Code and hope the C-Compiler gets it right.> I'll bet a dollar that there are few that have even seen Commercial> Software that was reviewed by the FDA or DOD. If you want to pass> the muster, take a lesson.Well you can believe me that I have seen many commercial C-Compilers andALL work that way, because it's STANDARD-C-BEHAVIOUR.> The ONLY reason why the 'C' Language is now allowed instead of ADA> in Government end-user applications is because of persons like me> who specified and signed up to some minimum standards. These standards> say nothing about style, but make damn certain that the compiler(s)> to be used generate the code specified. This means that some sloppy> constructs are simply not allowed.Read the standard from K&R (this is really the minimum ALL C-Compilersknow about).> 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.Right, but the assignment returns the RHS-value so the value of b.> This, as I explained over and over again, is called a> "boolean test of assignment error". It is a real error because,> unless the machine crashed, it is always TRUE. This is what> Lint is complaining about. One needs to test the result. You> can do this by adding a sequence-point.Clearly wrong. Read my mail.Bye MartinP.S.: I said nothing till now, because I thought you will learn theright way. So I will say nothing more after this. If you can't write Cleave it.-To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger.rutgers.eduPlease read the FAQ at http://www.tux.org/lkml/`