RE: coding style: type* variable or type *varible

2005-09-14 Thread Dave Korn
Original Message From: Mike Stump Sent: 13 September 2005 20:28 On Sep 13, 2005, at 12:23 PM, Rafael Espíndola wrote: I have seen both in gcc. I have found that type* variable is preferred in C++ code but I haven't found any guidelines for C code. If you ask gcc, you find: mrs $

Re: coding style: type* variable or type *varible

2005-09-14 Thread Robert Dewar
Dave Korn wrote: char* a, b, c; clearly we cannot allow this confusing notation, indeed this is a strong argument for char *a; which is really more in C style anyway I think.

Re: coding style: type* variable or type *varible

2005-09-14 Thread Perret Yannick
Dave Korn wrote: Original Message From: Mike Stump Sent: 13 September 2005 20:28 On Sep 13, 2005, at 12:23 PM, Rafael Espíndola wrote: I have seen both in gcc. I have found that type* variable is preferred in C++ code but I haven't found any guidelines for C code.

Re: coding style: type* variable or type *varible

2005-09-14 Thread Larry Evans
On 09/14/2005 04:46 AM, Dave Korn wrote: [snip] IMO (and this is a _very_ IMO subject, so I acknowledge in advance that there is no one true way and that I may feel so but other people may feel differently), the argument for making the asterisk abut the variable name rather than the type is

Re: coding style: type* variable or type *varible

2005-09-14 Thread Diego Novillo
This has gone off-topic. Please continue elsewhere.

Re: coding style: type* variable or type *varible

2005-09-14 Thread Robert Dewar
Larry Evans wrote: IIUC, this declares all a, b, and c as char*; yet, the only difference is the typedef is used to abbreviate the type as expected, typedef is not like #define, I don't see a problem here

Re: coding style: type* variable or type *varible

2005-09-13 Thread Mike Stump
On Sep 13, 2005, at 12:23 PM, Rafael Espíndola wrote: I have seen both in gcc. I have found that type* variable is preferred in C++ code but I haven't found any guidelines for C code. If you ask gcc, you find: mrs $ grep 'int\* ' *.c | wc -l 4 mrs $ grep 'int \*' *.c | wc -l 369

Re: coding style: type* variable or type *varible

2005-09-13 Thread Rafael Espíndola
On 9/13/05, Mike Stump [EMAIL PROTECTED] wrote: If you ask gcc, you find: mrs $ grep 'int\* ' *.c | wc -l 4 mrs $ grep 'int \*' *.c | wc -l 369 pretty clear to me. In treelang/parse.y all variables named tok (and some others) are declared with struct prod_token_parm_item*

Re: coding style: type* variable or type *varible

2005-09-13 Thread Daniel Berlin
On Tue, 13 Sep 2005, Rafael Espíndola wrote: On 9/13/05, Mike Stump [EMAIL PROTECTED] wrote: If you ask gcc, you find: mrs $ grep 'int\* ' *.c | wc -l 4 mrs $ grep 'int \*' *.c | wc -l 369 pretty clear to me. In treelang/parse.y all variables named tok (and some others) are

Re: coding style: type* variable or type *varible

2005-09-13 Thread Rafael Ávila de Espíndola
On Tuesday 13 September 2005 18:11, Daniel Berlin wrote: So, uh, change them :) I have just submitted a patch :) Rafael pgpOrEeEKuddE.pgp Description: PGP signature