Re: PATCH: io.h remove detrimental do {...} whiles, add sequencepoints, add const modifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> So Brad's way allows things that weren't allowed before.  But does
> it break anything that works with the do/while construct?
> 
> You can take care of attempts to use the return type by voiding it:
> 
> #define set_io_port_base(base)		\
> 	(void)(*(unsigned long *)&mips_io_port_base = (base))
> 

Maybe I missed this, but is there any reason for the patch, other then 
a personal preference of how to do macros that look like functions? 
I've seen gcc do strange non-optimal things with functions declared
inlines, but I've never seen it generate bad code WRT to do{}while(0)
constructs.

Unless I'm missing something, this patch looks like a solution in search
of a problem...

-Justin



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux