This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi All
consider the following c code,
#include<stdio.h> main() { char *x; if (*x==NULL) { printf("hello"); } }
the code prints "hello" if i compile using CC....
but when i compile the same code using gcc it gives "Memory fault(coredump)"......
Why is it so? Do i need to include any extra options in gcc to make it work?
My objective it to make the above code work using gcc without any code change....
Kindly Suggest...
Thanks.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |