[Bug c/32174] New: Condition check for const char string fails
kmanjunat at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 1 05:24:00 GMT 2007
Ive been working on a c program that does the error
condition check in the beginning as follows,
char *fun(str)
const char *str;
{
if (str == NULL) <-- Error check, taking the const char variable directly.
printf("Null string \n");
..............
}
But the code fails to perform the error checking
when a NULL string is passed and gives a segmentation
fault.
Did anyone face a similar problem. Please provide me some
information regarding this problem.
--
Summary: Condition check for const char string fails
Product: gcc
Version: 3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kmanjunat at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32174
More information about the Gcc-bugs
mailing list