Re: ellipsis in switch statements


Subject: Re: ellipsis in switch statements
From: Tomasz Wegrzanowski (maniek@beer.com)
Date: Mon Jul 10 2000 - 18:11:00 CDT


On Mon, Jul 10, 2000 at 01:50:05PM -0400, Thomas Briggs wrote:
>
> On approximately line 600 of abi/src/wv/text.c is the following chunk of
> code:
>
> case 0x9f ... 0xff:
> printf("%c", char16);
> return(1);
>
> First of all, I will openly admit that I'm not a C++ guy. I like
> classes. That's about as far as I go into the deep dark world of C++. And
> I have to imagine that this is valid C++, or AbiWord wouldn't build on other
> platforms.
> However, I'm as certain as I am that I'm breathing that this is invalid
> C, and that that's why it won't compile on Win32 (the VC++ compiler gets
> picky due to the file extension). So my question is, what's the best fix
> for this? Thus far all I've come up with is putting
>
> if( (char16 >= 0x9f) && (char16 <= 0xff) )
> {
> printf("%c", char16);
> return(1);
> }
>
> at the top of the function and commenting out the offending block. Is there
> a more elegant solution that I'm missing? Is this in some strange world
> valid C? Am I missing something really obvious?

There is more elegant solution : use GNU C :-).
This is not C/C++ problem but GCC extension.



This archive was generated by hypermail 2b25 : Mon Jul 10 2000 - 18:26:18 CDT