#1999 SIGSEGV - function pointer in struct

closed-duplicate
Ben Shi
Front-end
5
2015-02-12
2012-03-31
mz-fuzzy
No

Caught signal 11: SIGSEGV for code:

typedef struct {
int (*func)(void);
} struct_t;

int f(void);

struct_t inst = { f };

int f(void)
{
return (-1);
}
==========================

SDCC : mcs51/gbz80/z80/z180/r2k/ds390/pic16/pic14/TININative/ds400/hc08 3.1.4 #7508 (Mar 30 2012) (Linux)

Discussion

  • mz-fuzzy

    mz-fuzzy - 2012-03-31
     
  • mz-fuzzy

    mz-fuzzy - 2012-03-31
    • priority: 5 --> 6
     
  • Philipp Klaus Krause

    This is not a silent failure: It is cleary visible to the user. Furthermore, a workaround exists (assigning memeber in main function). Thus using priority 5.

    Philipp

     
  • Philipp Klaus Krause

    • priority: 6 --> 5
     
  • Ben Shi

    Ben Shi - 2015-02-12

    duplicate to bug #2124, fixed in reversion #9178.

     
  • Ben Shi

    Ben Shi - 2015-02-12
    • status: open --> closed-duplicate
    • assigned_to: Ben Shi
    • Category: --> Front-end
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks