public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32166]  New: Condition check for const char string fails
@ 2007-05-31 15:51 kmanjunat at gmail dot com
  2007-05-31 16:35 ` [Bug c/32166] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: kmanjunat at gmail dot com @ 2007-05-31 15:51 UTC (permalink / raw)
  To: gcc-bugs

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=32166


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-12-02 21:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-31 15:51 [Bug c/32166] New: Condition check for const char string fails kmanjunat at gmail dot com
2007-05-31 16:35 ` [Bug c/32166] " pinskia at gcc dot gnu dot org
2007-06-01  7:52 ` kmanjunat at gmail dot com
2007-06-01 11:19 ` rguenth at gcc dot gnu dot org
2007-06-01 11:19 ` rguenth at gcc dot gnu dot org
2007-06-10  2:10 ` pinskia at gcc dot gnu dot org
2007-12-02 21:32 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).