[Libreoffice] [PATCH] avoid ambiguous else

Takeshi Abe tabe at fixedpoint.jp
Thu Feb 3 05:52:03 PST 2011

Hi Kohei, Thomas,

On Wed, 02 Feb 2011 17:44:37 -0500, Kohei Yoshida <kyoshida at novell.com> wrote:
> On Wed, 2011-02-02 at 23:27 +0100, Thomas Arnhold wrote:
>> Oh, I think this was a mistake o mine. I removed the brackets, didn't
>> really thought, that the else statement could be associated with the
>> inner if. I attached the patch to bring the brackets back.
> No worries I'd already put the fix in before you sent your patch. :-)
Thanks a lot for your quick response & fix!

FYI, ANSI/ISO C takes care of the ambiguous else by describing like:
"An else is associated with the lexically immediately preceding else
-less if that is in the same block (but not in an enclosed block)."
but I could not find the equivalent statement in ISO C++ specification.
Well, I am a fan of such a meta-ambiguity ;)

-- Takeshi Abe

More information about the LibreOffice mailing list