This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix of small typo
- To: law at cygnus dot com
- Subject: Re: fix of small typo
- From: Horst von Brand <vonbrand at inf dot utfsm dot cl>
- Date: Fri, 04 Dec 1998 10:23:47 -0300
- cc: Horst von Brand <vonbrand at inf dot utfsm dot cl>, mrs at wrs dot com (Mike Stump), egcs-patches at cygnus dot com
Jeffrey A Law <law@hurl.cygnus.com> said:
> In message <199812032058.RAA21785@pincoya.inf.utfsm.cl>you write:
> > mrs@wrs.com (Mike Stump) said:
> > [...]
> > > #define ASM_FILE_START(FILE) \
> > > ! do { output_file_directive (FILE, main_input_filename); \
> > > } while (0)
> > Can't the do{ .. }while(0) be removed here?
> I don't recommend removing them.
> The do { ... } while (0) constructs make maintenance significantly easier.
>
> Such constructs are much more tolerant of being used in if/else arms
> safely for example.
That is certainly true, but it is (or should be?) superfluous in this
particular case. I for one prefer to have to simplest, cleanest code
possible at all times. If not, somebody _will_ start wondering someday what
is missing inside the do { ... } while(0).
Just different styles to program, I guess. Not even a small deal ;-)
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513