avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [bug #34695] fixed width int types without __attribut


From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] [bug #34695] fixed width int types without __attribute__()
Date: Mon, 31 Oct 2011 22:29:44 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Bob Paddock schrieb:
All this appears to be specific only to some proprietary lint that
unlike gcc doesn't even run everywhere, so not a relevant argument IMHO.

It is one of the most common Lints in commercial environments.

But why clutter avr-libc with lint? You will have
__attribute__((progmem))    from PROGMEM and PSTR macros
__attribute__((signal))     from ISR macro
__attribute__((interrupt))  for ISR code
__attribute__((naked))      for custom startup/ISR bits
__attribute__((OS_main))    AVR-specific
__attribute__((OS_task))    AVR-specific
__attribute__((noinline))
__attribute__((always_inline))
__attribute__((noclone))
__attribute__((const))
__attribute__((pure))
__attribute__((noreturn))

so you could just do
#define __attribute__(...)
or it's command line equivalent to get rid of all the messages.

BTW: What will (sp)lint to with named address space qualifiers?
Either it must be able to be told that there is special semantics or you end up dirscarding hundreds of potential RAM <-> Flask access failures when ignoring the qualifier.

----

As far as avr-libc and -mint8 is concerned: Instead of messing with machine modes, it could do

#if __INT_MAX__ == 127
typedef signed long int16_t;
typedef signed int
   __attribute__((deprecated("no int32_t together with -mint8")))
   int32_t;
...
#elif __INT_MAX__ == 32767
typedef signed int int16_t;
typedef signed long int32_t;
...
#else
#error
#endif

or is there a reason why that do not work?

Johann










reply via email to

[Prev in Thread] Current Thread [Next in Thread]