Issue with NULL pointers on Harvard Architecture platform

前端 未结 6 986
醉话见心
醉话见心 2021-01-17 08:59

Interesting issue we came across here this week.

We are working in C on a Harvard Architecture embedded platform, which has 16-bit data addresses and 32-bit code add

6条回答
  •  长情又很酷
    2021-01-17 09:27

    Edit the implemention's system headers to replace all occurrances of

    #define NULL ((void *)0)
    

    with

    #define NULL 0
    

    Then file a bug report with the vendor. You should not have to modify your (perfectly correct, albeit ugly style) code because of a bug in the vendor's compiler.

提交回复
热议问题