On 12/04/2015 06:52 PM, H.J. Lu wrote:
On Fri, Dec 4, 2015 at 11:26 AM, Vladimir Makarov <vmaka...@redhat.com> wrote:
   The following patch fixes

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68349

   The patch was tested and bootstrapped on x86/x86-64.

  Committed as rev. 231300.
unsigned long strlen();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I got

./xgcc -B./ -O2
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr68349.c
-S -m32
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr68349.c:6:15:
warning: conflicting types for built-in function ‘strlen’
  unsigned long strlen();

Shouldn't strlen be renamed?

Thanks for reporting this, H.J.

I've committed the following patch:

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 231368)
+++ ChangeLog   (working copy)
@@ -1,3 +1,7 @@
+2015-12-07  Vladimir Makarov  <vmaka...@redhat.com>
+
+       * gcc.target/i386/pr68349.c (strlen): Rename to my_strlen.
+
 2015-12-07  Nathan Sidwell  <nat...@acm.org>

        * gcc.target/nvptx/abort.c: New.
Index: gcc.target/i386/pr68349.c
===================================================================
--- gcc.target/i386/pr68349.c   (revision 231300)
+++ gcc.target/i386/pr68349.c   (working copy)
@@ -3,7 +3,7 @@
 /* { dg-options "-O2" } */

 int a, b;
-unsigned long strlen();
+unsigned long my_strlen();
 typedef struct sHyphenNode {
   char sepcnts[0];
   struct sHyphenNode *Daughters[];
@@ -12,7 +12,7 @@
 PHyphenNode c;
 void DoHyphens_Field_1() {
   char d[300], e[300];
-  int z, f, l = strlen();
+  int z, f, l = my_strlen();
   for (; z;)
     ;
   for (; l; z++) {

Reply via email to