This is the mail archive of the gcc-help@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: 'do {} while (0)' replacement


Hi Christoph,

> What about:
> 
> do {
>   if (i < 0) {
>      break;
>   }
> } while (0)

The break will break out of the once-thru do-while, not out of Frank's
infinite for(;;).

--Eljay


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