<< Back to previous view

[PCC-123] static inline functions need reference counting rather than just reference noting Created: 04/Apr/10  Updated: 01/May/14

Status: Closed
Project: pcc
Component/s: pcc backend
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Iain Hibbert Assignee: Anders Magnusson
Resolution: Won't Fix Votes: 0
Environment: NetBSD

if static inline function A is referred to by static inline function B which itself is unused, it will still be emitted. Consider the following code fragment

void tomato (void);

static inline void potato (void)

static inline void legato (void)

main(int ac, char *av[])
        return 0;

which will fail to link because of undefined reference to 'tomato.'. When built with -c, nm shows

0000000c T main
00000000 t potato
                U tomato

I'm not sure if this can be fixed easily within pcc as a single reference flag is currently kept.

Comment by Anders Magnusson [ 18/Apr/10 07:09 PM ]
Yes, it's a well-known bug. I'll fix it someday.
Comment by Anders Magnusson [ 01/May/14 04:02 PM ]
This is just a "minor inconvenience" :-)
Generated at Wed Oct 18 07:38:08 CEST 2017 using JIRA Enterprise Edition, Version: 3.13.1-#333.