This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] initial OpenCL C language support
On Wednesday, October 27, 2010 9:20:50 pm Pedro Alves wrote:
> 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.
Ok, thanks for clarifying. I have changed the code to look like this:
case BINOP_NOTEQUAL:
ret = !value_equal (val1, val2);
Regards
Ken