[Tinyos-devel] The infamous $ in identifiers ...

Vlado Handziski handzisk at tkn.tu-berlin.de
Fri Jul 18 08:48:34 PDT 2008


I can't find the link to the actual minutes, but the issue has been
discussed in the Core WG and we have agreed to replace the $ with a better
supported symbol after the 2.1 release.

Vlado

On Fri, Jul 18, 2008 at 5:31 PM, Aurélien Francillon <
aurelien.francillon at inrialpes.fr> wrote:

> Hi,
> since a quite long time (ever ?) tinyos/nesc uses the "$" sign in
> identifiers for translating modules names + function/variable name into
> one unique label, this is mostly transparent to the developer as this is
> seen only in the C file generated by nesc and sent to gcc, but :
> - it requires a patch to binutils  and it does not looks like it's going
> to be included in default binutils. The effort [1] didn't get very far
> and a patch would be needed for each architecture avr/msp/arm ?
> - if it get in one day it's going to be for future versions only not
> likely back ported to older versions,
> - default compiler is therefore not working with default tinyos tree out
> of the box and build dies with thousands of obscure messages from the
> assembler,
> - packages maintainers of linux distributions/toolchain scripts usually
> like to have the less possible number of patches added to the vanilla
> package, and i don't know any other "user" of "$ in identifiers" than
> tinyos ?
> - gdb does not like it, the $ breaks label auto completion in terminal
> mode, and IIRC you need to quote identifiers,
> - I personally find it ugly ;) and it bites me form time to time,
> "hopefully" so many times that I recognize it immediately now ;), but
> for new users to tinyos this might be hard to debug, especially
> considering the quite large avr community, lots of them may have skipped
> the install step of the patched binutils if they already have it,
> - support is there in some makefiles (at least avr.rules and msp.rules)
> to use "__" instead, this works very well for me since a few months
> without problems,
> - is it compliant with the C standard ?
> - is see no drawback ? Is there any ? Well, it probably breaks if
> someone is using "__" in a variable name or module name in a .nc file.
> Could nesc check for this and display a nice informative message ?
>
> As a release is going out soon it's probably too late in
> the testing phase to have this in ? Although the change should not
> break anything and stripped binaries should be exactly the same...
> Could this be discussed for the next one ?
>
> Cheers
> Aurélien
>
> [1] http://sourceware.org/ml/binutils/2007-04/msg00161.html
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080718/bb30a3e0/attachment.htm 


More information about the Tinyos-devel mailing list