bugAVR C Runtime Library - Bugs: bug #60735, bad declaration example in...


You are not allowed to post comments on this tracker with your current authentication level.

bug #60735: bad declaration example in pgmspace.html

Submitter:  None
Submitted:  Sat 05 Jun 2021 08:51:34 PM UTC
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  None Assigned to:  None
Percent Complete:  0% Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  2.0.0
Fixed Release:  None

Sat 05 Jun 2021 08:51:34 PM UTC, original submission:  

This page:


contains this:

  #include <avr/pgmspace.h>
unsigned char mydata[11][10] PROGMEM =

With warning options, on avr-gcc (version 7.3.0) this results in this compile error:

main_bootloader.c:28:15: error: variable 'mydata' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Changing the first line to begin 'unsigned char const' makes the build work (as the error suggests it would).  Since the definition is const it would probably be best to include the const keyword.



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

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-1277.
    Corresponding source code