Menu

#4041 Variable qualifier bleeds into function return type

open
nobody
None
other
5
2026-07-20
2026-07-20
No

Regression test absolute.c.in has this code (with {mem} replaced by __xdata):

typedef void (* const Function)(void);
__xdata Function __at(ADDRESS(AC)) f = NULL;

And incorrectly complains:

cases/absolute/absolute_mem___xdata.c:41: warning 361: qualifier on return type has no effect

The memory declarator places the variable f in xdata (at the specifed address) and should not modify the return type. The generated code is correct, the warning is not.

Discussion


Log in to post a comment.