Menu

#515 Fix warning 361 for absolute function pointers

open
nobody
None
other
5
1 day ago
1 day ago
No

Fixes [bugs:#4013] and [bugs:#4041].

This patch puts the implicit volatile from __at on the function pointer itself.
Before this, SDCC put the volatile from __at on the function return type by mistake,
this caused warning 361.

I also added a regression test based on [bugs:#4013].

Tested bug-4013.c and absolute_mem___xdata.c.
Both passed, and warning 361 is no longer emitted.

ChangeLog:

* src/SDCCsymt.c (checkSClass): Put the volatile from __at on the
  function pointer itself, not on the function return type.
* support/regression/tests/bug-4013.c: New regression test.
1 Attachments

Related

Bugs: #4013
Bugs: #4041

Discussion


Log in to post a comment.