This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: fix typo in execute/string-opt-8.c
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Jun 2002 11:12:58 -0700
- Subject: patch: fix typo in execute/string-opt-8.c
[diego, this was one of the type incompatibilities getting triggerd
in the tree-ssa-branch.]
we define the prototype as:
extern int strncmp (const char *, const char *, size_t);
and then we define the function with another type. i guess i should
investigate why gcc wasn't emitting an error or warning (as 2.95 does).
anyways... committed as obvious.
2002-06-27 Aldy Hernandez <aldyh@redhat.com>
* gcc.c-torture/execute/string-opt-8.c (strncmp): Fix typo in
return type.
Index: testsuite/gcc.c-torture/execute/string-opt-8.c
===================================================================
RCS file: /cvs/uberbaum/gcc/testsuite/gcc.c-torture/execute/string-opt-8.c,v
retrieving revision 1.5
diff -c -p -r1.5 string-opt-8.c
*** testsuite/gcc.c-torture/execute/string-opt-8.c 3 Jan 2001 16:54:46 -0000 1.5
--- testsuite/gcc.c-torture/execute/string-opt-8.c 27 Jun 2002 18:09:00 -0000
*************** int main ()
*** 231,237 ****
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
! static char *
strncmp(const char *s1, const char *s2, size_t n)
{
abort();
--- 231,237 ----
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
! static int
strncmp(const char *s1, const char *s2, size_t n)
{
abort();