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]
Other format: [Raw text]

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




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.


If you ask gcc, you find:

mrs $ grep 'int\* ' *.c | wc -l
       4
mrs $ grep 'int \*' *.c | wc -l
     369

pretty clear to me.





My two cents...

Well, for my version of gcc (gcc-4.1-20050528), I only get 3 'int*', and all
the three are in comments, not in C code.

I also get 10 'int * '.

By my side, the only place I put int* is for casts.

Regards,
--
Yannick


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