Re: Stray \302 error

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

 



On Wed, Aug 31, 2011 at 12:07:14PM +0100, Andrew Haley wrote:
> On 08/31/2011 11:53 AM, Avinash Sonawane wrote:
> > avinash@titanic:/Remastersys/Documents/Programs/c$ gcc dm.c -o dm
> > dm.c: In function ‘main’:
> > dm.c:17:1: error: stray ‘\302’ in program
> > dm.c:17:1: error: stray ‘\240’ in program
> 
> 
> Try
> 
> 
> LANG=C gcc dm.c -o dm
> 
On my machine, that's not the problem. I think it's really an error in
the code: you have an illegal character hidden in the file: The first
space in line 17 is not a "space" but a "no-break space" from unicode.
(to make it worse, this character code is displayed as space by most
text editors....).
Just open the file, delete the first space in line 17 an replace it by a
true space and gcc will compile.
(Just for the record, VIM detects the character as "160, Hex 00a0, Oktal 240",
while a true space should be "32,  Hex 20,  Oktal 040").

HTH,

Axel


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux