This is the mail archive of the gcc-patches@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]

Question to c-lex.c


I'm not sure to which mailing list something like this goes....

In line 1001 of c-lex.c:
---------------------------------------------------------------------
#define ERROR(msgid) do { error(msgid); goto syntax_error; } while(0)
---------------------------------------------------------------------

Can someone maybe help explaining it?
Why would I want to do something while never?

A reason I can imagine is in cases when I want to work around goto
statements like do {...; if (x) break; ...;} while (0);
however that doesn't seem to be the case.

hmm, maybe this would to the same?
#define ERROR(msgid) {error(msgid); return integer_zero_node;}


-- 
Sent through GMX FreeMail - http://www.gmx.net


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