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: [patch] initial OpenCL C language support


On Wednesday 27 October 2010 20:04:17, Jan Kratochvil wrote:
> On Tue, 26 Oct 2010 15:57:47 -0400, Joel Brobecker wrote:
> > > +      ret = ! value_equal (val1, val2);
> >               ^^^^^ extra space
> 
> GNU Coding Standards contains only this reference to the ! operator:
>        if (! fp)
> 
> (GDB code contains enough of both cases.)

GCC makes that rule explicit:

http://gcc.gnu.org/codingconventions.html

<quote>
Code in GCC should use the following formatting conventions: 
Use...                     ...instead of
!x                         ! x
~x                         ~ x
-x (unary minus)           - x
(foo) x (cast)             (foo)x
*x (pointer dereference)   * x
</quote>

We tend to follow these already, so I'm of the opinion we should
make them explictily official in gdb too.

-- 
Pedro Alves


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