Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22155

Initializing an array with NULL pointer with GCC throw error

$
0
0

I am using GCC and IAR to compile some C code.

#include <stdio.h>#include <stdint.h>#include <stddef.h>uint8_t tab[] = NULL;

this exmple code throw this error with GCC : error: invalid initializer

With IAR compiler the syntax is accepted

What is wrong here with GCC and why it is accepted by IAR compiler?


Viewing all articles
Browse latest Browse all 22155

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>