AVR C Runtime Library - Bugs: bug #56093, Wrong constraint in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56093: Wrong constraint in pgmspace.h::pgm_get_far_address
Submitter: | Georg-Johann Lay <gjlayde> | ||
Submitted: | Sun 07 Apr 2019 01:00:58 PM UTC | ||
Category: | Header | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | None | Percent Complete: | 0% |
Assigned to: | None | Open/Closed: | Open |
Release: | 2.0.0 | Fixed Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
No changes have been made to this item
Macro pgm_get_far_address() from avr/pgmspace.h has a wrong constraint for operand %1: Is must be "ni" (known at compile-time (n) or known ar assembly time or later (i)) instead of "p".
Moreover, the asm is not volatile, hence the "volatile" can be dropped.
The "tmp" should also be recplaced by an identifier from implementation space like __tmp.
Last not least, the macro should come with "extension" so that it will work in strict C mode (and not only with GNU-C which valued blocks are).
Putting everything together, the macro should read