[splint-discuss] Tolerance for compiler extensions
Simon Hosie
Simon.Hosie at connexionz.co.nz
Thu Sep 25 23:26:18 EDT 2003
Matthias Hawran:
> [...]
> I read the whole thread, but i didn't find / undestand what is your
> construct to hide (#pragma asm/endasm) from splint. As i'm developping
> with embedded software compilers, it's hard to avoid this construct.
I think the first thing you should do is try to get the compiler fixed. Pragma attempts to make compiler extensions portable, but switching between languages using it won't make sense to other compilers so it's no use, _and_ it breaks any chance (pre-C99) you have of preprocessing the offending code away. You may as well have something that will give a nice clean syntax error without any pretense.
There are ways of implementing inline assembly that make it much easier to port the code. Of the implementations I've seen, I like Watcom the most. You could use a pragma to define a macro-like block of assembly that would be put inline where the name of the function was used. gcc's system works, too.
_______________________________________
Connexionz Ltd
Simon Hosie
Simon.Hosie at connexionz.co.nz
__________________________________________________
New Zealand Office
Building 2,Level 1,1 Show Place
Christchurch
Office: +64 33394536
Fax: +64 33394537
http://www.connexionz.co.nz
United Kingdom Office
Regus House, Fairbourne Drive, Atterbury -Milton Keyes MK10 9RG
Phone : 02890 577 774
The information in this email (including attachments) is confidential and may be legally privileged. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email and destroy the message. If you are not the intended recipient, any use, disclosure, copying or distribution is prohibited and may be unlawful
More information about the splint-discuss
mailing list