From: Neil Booth <neil@daikokuya.co.uk>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Michael Stefaniuc <mstefani@redhat.com>,
Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: '$' as "valid" character in identifiers
Date: Thu, 24 May 2007 23:26:08 +0900 [thread overview]
Message-ID: <20070524142608.GJ2547@daikokuya.co.uk> (raw)
In-Reply-To: <20070524100433.GE4095@ftp.linux.org.uk>
Al Viro wrote:-
> > I think it was a common extension for some strange operating systems
> > (read: VMS), where system symbols have "$" embedded in the name. So you'd
> > have names like "sys$function()" for system functions.
> >
> > It's possible others did it too - gcc says it's "traditional", but the
> > only case I've seen it is from VMS (and thus from DEC->Compaq->HP C
> > compilers).
> >
> > But I certainly wouldn't object to sparse supporting it, although I would
> > suggest that it at least warn by default.
>
> The question is how do they treat $ in preprocessor tokens. Is it a full
> equivalent of letter? I.e. is $x a valid identifier? If it is, that's
Apparently yes:
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/ARH9NATE/DOCU_026.HTM
My personal opinion is we don't want to encourage $ in identifiers,
and so I'd urge you to drop the idea :). Too many poor mis-featured
extensions in GCC already. At least if you do go ahead it seems the
implementation is trivial (assembler aside).
Neil.
next prev parent reply other threads:[~2007-05-24 14:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2007-05-24 14:35 ` Neil Booth
2007-05-24 14:36 ` Neil Booth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070524142608.GJ2547@daikokuya.co.uk \
--to=neil@daikokuya.co.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=mstefani@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).