sparse function pointer arguments now accept void pointers
PATCH 1/1 sparse function pointer arguments now accept void pointers
This patch eliminates warnings of the form:
incorrect type in argument 1 (different base types)
from code of the form:
#define VPTR ((void *)1)
void f( int (g)(void))
{
}
int
main(void)
{
f(VPTR);
f(0);
}evaluate.c +1 -1
@@ -647,7 +653,7 @@ t = t->ctype.base_type; target_as |= t->ctype.as; } -if (t->type ==SYM_PTR ) { +if (t->type ==SYM_PTR || t->type ==SYM_FN ) {struct expression *right = *rp;struct symbol *s = source;int source_as;
Quoted 1 line · In article <[email protected]> you wrote:
This patch eliminates warnings of the form:
...
evaluate.c line 656
Quoted 2 lines
evaluate.c +1
-1-if (t->type ==SYM_PTR ) { +if (t->type ==SYM_PTR || t->type ==SYM_FN ) {
unlikely
Greetings
Bernd
Signature · 2 lines
eckes privat - http://www.eckes.org/ Project Freefire - http://www.freefire.org/
Bernd,
I might have messed up here. But could you give a little more explanation, to help me understand what you think is wrong with this and why?
Dave
Quoted 18 lines · Bernd Eckenfels
Quoted 1 line · In article <[email protected]> you wrote:
This patch eliminates warnings of the form:
...
evaluate.c line 656
Quoted 2 lines
evaluate.c +1
-1-if (t->type ==SYM_PTR ) { +if (t->type ==SYM_PTR || t->type ==SYM_FN ) {unlikely
Greetings
BerndSignature · 7 lines
eckes privat - http://www.eckes.org/ Project Freefire - http://www.freefire.org/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/