This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Coding convention: use of `!x' vs. `! x'


David Edelsohn writes ...
> 
> Richard> What about the other unary operators?  Should they have a blank, like the
> Richard> binary operators do, or no blank, like "!" now will?

One practical advantage of using "!x" (and similar for all other unary
operators) is that it is visually consistent with the C precedence
rules.

 5 - ~ x + 1 // less clear
 5 - ~x + 1  // better

// more realistic example
 y + * x + 1
 y + *x + 1

-Tim



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]