[Top][All Lists]

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

[avr-libc-dev] [bug #36454] string.h: Error for long long in C90

From: Georg-Johann Lay
Subject: [avr-libc-dev] [bug #36454] string.h: Error for long long in C90
Date: Sat, 12 May 2012 08:27:11 +0000
User-agent: Opera/9.80 (Windows NT 5.0; U; de) Presto/2.6.30 Version/10.63


                 Summary: string.h: Error for long long in C90
                 Project: AVR C Runtime Library
            Submitted by: gjlayde
            Submitted on: Sa 12 Mai 2012 08:27:10 GMT
                Category: Header
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.8.0
           Fixed Release: None



string.h contains the following lines:

# define __ATTR_CONST__ __attribute__((__const__))
extern int ffsll (long long __val) __ATTR_CONST__;

long long is available since C99. Consequently, compiling or syntax-checking
the above line with C90 may run into

error: ISO C90 does not support 'long long' [-Wlong-long]

This is particularly inconvenient in the avr-gcc testsuite, for example,
because it's not appropriate to add -Wno-long-long to the testsuite or use
similar hacks.

Such prototypes should be shielded against C90 by, say,

#if defined __STDC_VERSION__ \
    && __STDC_VERSION__ >= 199900 \
    && !defined __cplusplus

or similar.

Likewise for other places that use long long, if any.


Reply to this item at:


  Nachricht gesendet von/durch Savannah

reply via email to

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