linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* '$' as "valid" character in identifiers
@ 2007-05-23 21:43 Michael Stefaniuc
  2007-05-23 22:00 ` Michael Stefaniuc
  2007-05-23 22:10 ` Linus Torvalds
  0 siblings, 2 replies; 13+ messages in thread
From: Michael Stefaniuc @ 2007-05-23 21:43 UTC (permalink / raw)
  To: Sparse Mailing-list

echo 'int dollar$ = 1;' > /tmp/dollar.c
gcc -c -Wall -Wextra -o /tmp/dollar.o /tmp/dollar.c
echo $?
0
No comment ...

I didn't find '$' as valid identifier character in "The C Programming
Language (ANSI C)" nor does http://c0x.coding-guidelines.com/5.2.1.html
allow it as valid char in the "source character set".

I found it because sparse tripped over that in the Wine source code.
Yes, i already sent a patch to fix that in Wine.

Not sure if sparse should change its behavior here;
cgcc -c -Wall -Wextra -o /tmp/dollar.o /tmp/dollar.c
/tmp/dollar.c:1:11: error: Expected ; at end of declaration
/tmp/dollar.c:1:11: error: got $
is a adequate response.

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-05-24 14:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 21:43 '$' as "valid" character in identifiers Michael Stefaniuc
2007-05-23 22:00 ` Michael Stefaniuc
2007-05-23 22:10 ` Linus Torvalds
2007-05-24 10:04   ` Al Viro
2007-05-24 11:14     ` Derek M Jones
2007-05-24 12:35       ` Al Viro
2007-05-24 13:18         ` Derek M Jones
2007-05-24 14:10           ` Al Viro
2007-05-24 14:43             ` Derek M Jones
2007-05-24 14:50             ` Michael Stefaniuc
2007-05-24 14:26     ` Neil Booth
2007-05-24 14:35       ` Neil Booth
2007-05-24 14:36         ` Neil Booth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).