Re: [Snowball-discuss] Problem with compiling Snowball under Visual C++

From: Martin Porter (martin.porter@grapeshot.co.uk)
Date: Mon Nov 03 2003 - 08:55:01 GMT


In ANSI C labels cannot appear by themselves but must be attached to
statements, so the Snowball generated code is clearly in error here. It is
of course an unnecessary restriction, which is presumably why we've got away
with it for as long as we have.

The easiest solution is to follow each label with a semicolon, lab12:;
lab37:; etc. This is clumsy but I'm still tempted to go for it.

I recall Richard had the same problem with his Java codegenerator, and went
to some lengths to identify labels at the ends of blocks. Why he did not opt
for the simpler solution I've just suggested I do not remember now - perhaps
he can comment. If it was just to generate elegant code perhaps I should
follow his scheme in generating the ANSI C code so as not to be outdone.

Charlie, is this detail holding you back?

Martin

  



This archive was generated by hypermail 2.1.3 : Thu Sep 20 2007 - 12:02:45 BST