svn commit: trunk/busybox/util-linux

Rob Landley rob at landley.net
Thu Sep 21 18:43:44 UTC 2006


On Thursday 21 September 2006 2:53 am, Denis Vlasenko wrote:
> 	if (_IO_ferror_unlocked(stdio))  // cryptic error messags from gcc
> 		bad();

#defining something you're using as a ->member name is stupid, agreed.  
Especially when you're using that member name in another #define, and thus 
should know better.  However in that case, if I make a change to the source 
code and the build breaks, what change I just made to the source code is an 
important part of tracking down what I just broke.

I've encountered dozens of really strange cases where gcc produces horrible 
error messages.  One more doesn't phase me.  It's still doing better than 
Borland C did.

> enum would work here just fine.

*shrug*  My attitudes formed back when there were cases where #defines that 
became if(0) would optimize out and enums wouldn't, although that hasn't been 
the case in a longish time now.  But I still just don't see anything wrong 
with #defines in this instance.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list