Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: David <borris@ant.co.uk>
Subject: string.h, strlen(), warnings from gcc
Date: Mon, 17 Jun 1996 02:04:26 +0100 (BST)	[thread overview]
Message-ID: <36bc482bf872c29879e83d366b4411d8.axp-list@archive.invalid> (raw)

Can anyone explain why I should need to explicitly specify extern 
strlen() after including <string.h> for the following simple example?

fresco@banshee:/tmp $ cat a.c
#include <string.h>

/*extern size_t strlen(const char *ptr);*/

size_t z(const char *y)
{
    return strlen(y);
}
fresco@banshee:/tmp $ cc a.c
a.c: In function `z':
a.c:7: warning: type mismatch in implicit declaration for built-in function `strlen'

Borris
--- 
	When working				When playing

WWW:	http://www.ant.co.uk/~borris/		http://chaos.org.uk
Email:	borris@ant.co.uk			borris@chaos.org.uk

             reply	other threads:[~1996-06-17  1:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-17  1:04 David [this message]
     [not found] <Pine.SUN.3.90.960617020120.8650B-100000@ant>
1996-06-17  3:28 ` string.h, strlen(), warnings from gcc Richard Henderson
1996-06-17 17:22   ` David Fell
1996-06-17 10:04 ` Harald Koenig
  -- strict thread matches above, loose matches on Subject: below --
1996-06-17 16:21 David Mosberger-Tang
     [not found] <Pine.LNX.3.91.960617181918.17165A-100000@chaos.chaos.org.uk>
1996-06-17 20:51 ` Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox