This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [doc/gdbint] Mention some formatting guidelines for casts and unary operators


Pedro Alves wrote:
This is a follow up to a discussion from last November
<http://sourceware.org/ml/gdb-patches/2010-11/msg00121.html>,
that sort of came up today again.

It imports and casts to stone these recommendations (from GCC):

 Use...                     ...instead of
 !x                         ! x
 ~x                         ~ x
 -x (unary minus)           - x
 (foo) x (cast)             (foo)x
 *x (pointer dereference)   * x


which we have been largely following already anyway.


Okay?

Good by me.


Suggest also:

(type *) (cast) instead of (type*)

(type *name) (prototype) instead of (type* name)


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