#1377 can't init const function poins with NULL

closed-rejected
nobody
5
2013-05-25
2007-10-01
Anonymous
No

typedef struct Foo_
{
void (*f)();
} Foo;

This doesn't work:
const Foo foo = {NULL};

But this works:
const Foo foo = {0};

Discussion

  • Patryk

    Patryk - 2007-10-02

    Logged In: YES
    user_id=1788180
    Originator: NO

    Did you include any header with NULL definition (sttdef.h, stdio.h etc.)?

     
  • Maarten Brock

    Maarten Brock - 2007-10-19
    • milestone: --> unreproducable
    • status: open --> pending-rejected
     
  • Maarten Brock

    Maarten Brock - 2007-10-19

    Logged In: YES
    user_id=888171
    Originator: NO

    This can't be reproduced in 2.7.4. Can you confirm it still
    exists?

     
  • SourceForge Robot

    • status: pending-rejected --> closed-rejected
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

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

Sign up for the SourceForge newsletter:





No, thanks