From the generated asm, you are declaring a function pointer, which resides at 0xff81. And the following all do the same:

__at(0xff81) void(*f)(void);

 void(*__at(0xff81) g)(void);

 typedef void (*ftype)(void);

 ftype __at(0xff81) h;

 void test(void)
 {
    f();
    g();
    h();
 }

I'm not very familiar with function pointer declarations, but wonder if for the first one, the __at is syntactically on the return type? But we get the same warning for all three declarations.

Looking at the place where the warning is emitted, it looks like the return type of the function is considered to be volatile-qualified there. I guess that originates from checkSClass in SDCCsymt.c (line 2196f), which adds volatile to anything for which IS_ABSOLUTE holds .

 

Last edit: Philipp Klaus Krause 20 hours ago