[Wine] What is '' in wine sources.

Martin Gregorie martin at gregorie.org
Tue Oct 26 09:09:05 CDT 2010


On Tue, 2010-10-26 at 08:42 -0400, John Drescher wrote:
> > Hi, I am looking at wine sources, and I wonder what is  '' (in string.c for example). Twosingle quotes I mean. It's not the same as ' '.
> >
> No they are different.
> 
> Read here:
> http://en.wikipedia.org/wiki/C_syntax#Strings
> 
> >Should this compile?
> 
> I can not tell you without looking at the code. Just compile and see
> for your self.
> 
> You obviously do not know the C language. What are you trying to do?
> 
Actually, he might well know C. 

	char c = ''; 

doesn't compile with GCC 4.4.4 or with my ancient copy of the K&R C that
was supplied with Microware's OS-9/68K v2.4. I thought it was unlikely
to be strictly legal C and wasn't sure whether some compilers would
accept it, so ran a couple of tests earlier today. Other compilers may
accept it but those are the two I have immediately available.

On the face of it, a compiler should throw an error since, unlike
"" (the empty string) char is a fixed size variable, which makes
supplying an empty literal a meaningless expression.


Martin






More information about the wine-users mailing list