#1918 function prototype triggers error incorrectly

Ben Shi

When a prototype for a function that has a function pointer as a parameter does not supply a name for the parameter,
sdcc will report an error:

gen/ucr2k/vpvfunc_param/vpvfunc_param.c:35: error 98: conflict with previous def
inition of 'run_func' for attribute 'type'
from type 'void function ( void function ( void fixed) generic* fixed) __reentra
nt fixed'
to type 'void function ( void function ( ) __reentrant code* fixed) __reentrant
ports/ucr2k/spec.mk:54: recipe for target `gen/ucr2k/vpvfunc_param/vpvfunc_param
.rel' failed

../../bin/sdcc -I./fwk/include -c gen/ucr2k/vpvfunc_param/vpvfunc_param.c

SDCC : mcs51/gbz80/z80/z180/r2k/ds390/TININative/ds400/hc08 3.1.2 #7251 (Jan 23 2012) (CYGWIN)

(error occurs for sdcc compiled using either cygwin gcc 3.4.4 or 4.5.3)

I tested with the -mr2k, Phillip tested for -mz80, but we believe this affects all ports.


  • Lee Morrison

    Lee Morrison - 2012-01-25
  • Ben Shi

    Ben Shi - 2015-03-25
    • Category: --> Front-end
  • Ben Shi

    Ben Shi - 2015-05-19
    • status: open --> closed-invalid
    • assigned_to: Ben Shi
  • Ben Shi

    Ben Shi - 2015-05-19

    Not sure how it is fixed, but reversion #9237 accept the attached c file for all ports. I have added a new test case for this bug.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks