bugAVR C Runtime Library - Bugs: bug #36581, avr-libc: pgmspace.h is not ANSI...

 
 

bug #36581: avr-libc: pgmspace.h is not ANSI compliant

Submitted by:  Bernhard <bewo1>
Submitted on:  Sun 03 Jun 2012 08:45:19 AM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: FixedPercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: 1.8.0Fixed Release: 1.8.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 16 Sep 2012 11:02:25 AM UTC, comment #2:

> The header file pgmspace.h uses the inline-attribute.
> This attribute is not part of ANSI C.


Similar applies to:

include/util/delay.h.in
include/util/delay_basic.h

Georg-Johann Lay <gjlayde>
Sun 03 Jun 2012 08:09:59 PM UTC, comment #1:

Well, "ANSI C" (aka. C89) is basically yesterday's hero
(current standard is ISO C99, upcoming is ISO C11), but this
was much easier to fix than you believed.

Fixed in SVN r2294.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Sun 03 Jun 2012 08:45:19 AM UTC, original submission:

Hello,

I filed this bug report to the Debian project:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675759

The problem is the inline-attribute, that is not part of ANSI-C.

Here, the complete bug report:

-----
Hello,

the header file pgmspace.h uses the inline-attribute.
This attribute is not part of ANSI C.

My programs are compiled with the option -ansi.
Here is a minimal test program:

> #include <avr/io.h>
> #include <avr/pgmspace.h>
>
> int main (void)
> {
> while (1);
> return (0);
> }


Please compile this with:
$ avr-gcc -mmcu=atmega644p -ansi <file>

Compilation aborts because of the non-ansi include attribute in pgmspace.h

In GCC manual:
there is the predefined macro _STRICT_ANSI_ available, if parameter -ansi is used.
Please don't use the inline-attribute in case of _STRICT_ANSI_.

In avr-libc manual:
it is described, that this library has to be an ansi-c library.
This is described in chapter 1.2.

If you need more informations, please let me know.

Best regards
Bernhard
-----

Bernhard <bewo1>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gjlayde (Posted a comment)
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by hakan
  • -unavailable- added by bewo1 (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 03 Jun 2012 08:09:59 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.8.1
    Sun 03 Jun 2012 09:15:09 AM UTChakanCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1