Re: What is '' in wine sources.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux