public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Some small fixes
@ 2000-02-25 12:21 Andreas Jaeger
  2000-02-25 17:01 ` Ulrich Drepper
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Jaeger @ 2000-02-25 12:21 UTC (permalink / raw)
  To: GNU libc hacker

The flags in intl aren't needed anymore (according to my tests).  For
the math files I've removed -Wno-write-strings and use it only where
it's really needed.

I'm also appending patches to avoid the following warnings on alpha:
td_ta_thr_iter.c:96: warning: type mismatch in implicit declaration for built-in function `alloca'
td_ta_tsd_iter.c:39: warning: type mismatch in implicit declaration for built-in function `alloca'
../sysdeps/alpha/fpu/fraiseexcpt.c:66: warning: `return' with a value, in function returning void

Btw. regex.c outputs a number of warnings on 64bit platforms like:
regex.c:686: warning: int format, different type arg (arg 2)

For this code (p and start are pointers):
      printf ("%d:\t", p - start);

We could use either %ld or %t here - or cast the result to an int.
What's the best way to fix this?

Andreas

For linuxthreads_db/ChangeLog:
2000-02-25  Andreas Jaeger  <aj@suse.de>

	* td_ta_thr_iter.c: Include <alloca.h> for prototype declaration.
	* td_ta_tsd_iter.c: Likewise.

For the main ChangeLog:

2000-02-25  Andreas Jaeger  <aj@suse.de>

	* sysdeps/alpha/fpu/fraiseexcpt.c (__feraiseexcept): Correct
	declaration to return value.

	* sysdeps/ieee754/Makefile (CFLAGS-k_standard.c): Added.

	* math/Makefile: Remove -Wno-write-strings since it's only needed
	by one file.

	* intl/Makefile (CFLAGS-bindtextdom.c): The code has been fixed,
	we don't need to disable the warnings anymore, remove them.
	(CFLAGS-finddomain.c): Likewise.
	(CFLAGS-localealias.c): Likewise.


============================================================
Index: sysdeps/alpha/fpu/fraiseexcpt.c
--- sysdeps/alpha/fpu/fraiseexcpt.c	1999/10/31 23:13:21	1.4
+++ sysdeps/alpha/fpu/fraiseexcpt.c	2000/02/25 20:06:35
@@ -1,5 +1,5 @@
 /* Raise given exceptions.
-   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000  Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>, 1997.
 
@@ -21,7 +21,7 @@
 #include <fenv.h>
 #include <math.h>
 
-void
+int
 __feraiseexcept (int excepts)
 {
   double tmp;
============================================================
Index: sysdeps/ieee754/Makefile
--- sysdeps/ieee754/Makefile	1997/01/01 15:27:27	1.1
+++ sysdeps/ieee754/Makefile	2000/02/25 20:06:35
@@ -1,3 +1,5 @@
 ifeq ($(subdir),math)
 sysdep_headers += ieee754.h
+CFLAGS-k_standard.c = -Wno-write-strings
 endif
+
============================================================
Index: math/Makefile
--- math/Makefile	2000/01/27 01:46:45	1.93
+++ math/Makefile	2000/02/25 20:06:35
@@ -165,7 +165,7 @@
 endif
 
 # The fdlibm code generates a lot of these warnings but is otherwise clean.
-override CFLAGS += -Wno-uninitialized -Wno-write-strings
+override CFLAGS += -Wno-uninitialized
 
 # The -lieee library is actually an object file.
 # The module just defines the _LIB_VERSION_ variable.
============================================================
Index: intl/Makefile
--- intl/Makefile	2000/02/11 18:39:35	1.20
+++ intl/Makefile	2000/02/25 20:06:36
@@ -86,6 +86,3 @@
 
 endif
 
-CFLAGS-bindtextdom.c = -Wno-unused
-CFLAGS-finddomain.c = -Wno-unused
-CFLAGS-localealias.c = -Wno-unused
============================================================
Index: linuxthreads_db/td_ta_thr_iter.c
--- linuxthreads_db/td_ta_thr_iter.c	1999/11/12 23:28:15	1.9
+++ linuxthreads_db/td_ta_thr_iter.c	2000/02/25 20:06:36
@@ -1,5 +1,5 @@
 /* Iterate over a process's threads.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "thread_dbP.h"
-
+#include <alloca.h>
 
 static int
 handle_descr (const td_thragent_t *ta, td_thr_iter_f *callback,
============================================================
Index: linuxthreads_db/td_ta_tsd_iter.c
--- linuxthreads_db/td_ta_tsd_iter.c	1999/11/04 06:46:14	1.2
+++ linuxthreads_db/td_ta_tsd_iter.c	2000/02/25 20:06:36
@@ -1,5 +1,5 @@
 /* Iterate over a process's thread-specific data.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "thread_dbP.h"
-
+#include <alloca.h>
 
 td_err_e
 td_ta_tsd_iter (const td_thragent_t *ta, td_key_iter_f *callback,
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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

* Re: Some small fixes
  2000-02-25 12:21 Some small fixes Andreas Jaeger
@ 2000-02-25 17:01 ` Ulrich Drepper
  2000-02-26  0:16   ` Andreas Jaeger
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ulrich Drepper @ 2000-02-25 17:01 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

Andreas Jaeger <aj@suse.de> writes:

> The flags in intl aren't needed anymore (according to my tests).  For
> the math files I've removed -Wno-write-strings and use it only where
> it's really needed.

Thanks, applied.

> For this code (p and start are pointers):
>       printf ("%d:\t", p - start);
> 
> We could use either %ld or %t here - or cast the result to an int.
> What's the best way to fix this?

I would suggest to use %t protected by #ifdef _LIBC (similar to what
already happens for %p).

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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

* Re: Some small fixes
  2000-02-25 17:01 ` Ulrich Drepper
@ 2000-02-26  0:16   ` Andreas Jaeger
  2000-02-26  0:36   ` Andreas Jaeger
  2000-02-28  0:14   ` Andreas Jaeger
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Jaeger @ 2000-02-26  0:16 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

>>>>> Ulrich Drepper writes:

Uli> Andreas Jaeger <aj@suse.de> writes:
>> The flags in intl aren't needed anymore (according to my tests).  For
>> the math files I've removed -Wno-write-strings and use it only where
>> it's really needed.

Uli> Thanks, applied.

You forgot to apply these patches (the ChangeLog entries went
in).

Andreas

============================================================
Index: linuxthreads_db/td_ta_thr_iter.c
--- linuxthreads_db/td_ta_thr_iter.c	1999/11/12 23:28:15	1.9
+++ linuxthreads_db/td_ta_thr_iter.c	2000/02/26 08:14:58
@@ -1,5 +1,5 @@
 /* Iterate over a process's threads.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "thread_dbP.h"
-
+#include <alloca.h>
 
 static int
 handle_descr (const td_thragent_t *ta, td_thr_iter_f *callback,
============================================================
Index: linuxthreads_db/td_ta_tsd_iter.c
--- linuxthreads_db/td_ta_tsd_iter.c	1999/11/04 06:46:14	1.2
+++ linuxthreads_db/td_ta_tsd_iter.c	2000/02/26 08:14:58
@@ -1,5 +1,5 @@
 /* Iterate over a process's thread-specific data.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "thread_dbP.h"
-
+#include <alloca.h>
 
 td_err_e
 td_ta_tsd_iter (const td_thragent_t *ta, td_key_iter_f *callback,
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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

* Re: Some small fixes
  2000-02-25 17:01 ` Ulrich Drepper
  2000-02-26  0:16   ` Andreas Jaeger
@ 2000-02-26  0:36   ` Andreas Jaeger
  2000-02-28  0:14   ` Andreas Jaeger
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Jaeger @ 2000-02-26  0:36 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

>>>>> Ulrich Drepper writes:

Ulrich> Andreas Jaeger <aj@suse.de> writes:
>> The flags in intl aren't needed anymore (according to my tests).  For
>> the math files I've removed -Wno-write-strings and use it only where
>> it's really needed.

Ulrich> Thanks, applied.

You missed also the following patch (ChangeLog entry went in).

Andreas

============================================================
Index: math/Makefile
--- math/Makefile	2000/01/27 01:46:45	1.93
+++ math/Makefile	2000/02/26 08:16:49
@@ -165,7 +165,7 @@
 endif
 
 # The fdlibm code generates a lot of these warnings but is otherwise clean.
-override CFLAGS += -Wno-uninitialized -Wno-write-strings
+override CFLAGS += -Wno-uninitialized
 
 # The -lieee library is actually an object file.
 # The module just defines the _LIB_VERSION_ variable.

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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

* Re: Some small fixes
  2000-02-25 17:01 ` Ulrich Drepper
  2000-02-26  0:16   ` Andreas Jaeger
  2000-02-26  0:36   ` Andreas Jaeger
@ 2000-02-28  0:14   ` Andreas Jaeger
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Jaeger @ 2000-02-28  0:14 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

>>>>> Ulrich Drepper writes:

Ulrich> Andreas Jaeger <aj@suse.de> writes:
[..]
>> For this code (p and start are pointers):
>> printf ("%d:\t", p - start);
>> 
>> We could use either %ld or %t here - or cast the result to an int.
>> What's the best way to fix this?

Ulrich> I would suggest to use %t protected by #ifdef _LIBC (similar to what
Ulrich> already happens for %p).

Here's a patch - but now we get different warnings since gcc doesn't
understand %t and %z :-(.  I hope gcc gets fixed soon.

Andreas

2000-02-28  Andreas Jaeger  <aj@suse.de>

	* posix/regex.c (print_partial_compiled_pattern): Use correct
	format modifiers.
	(print_compiled_pattern): Likewise.

============================================================
Index: posix/regex.c
--- posix/regex.c	2000/02/25 17:05:59	1.69
+++ posix/regex.c	2000/02/28 07:36:44
@@ -683,8 +683,12 @@
   /* Loop over pattern commands.  */
   while (p < pend)
     {
+#ifdef _LIBC
+      printf ("%t:\t", p - start);
+#else
       printf ("%d:\t", p - start);
-
+#endif
+
       switch ((re_opcode_t) *p++)
 	{
         case no_op:
@@ -773,17 +777,29 @@
 
 	case on_failure_jump:
           extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/on_failure_jump to %t", p + mcnt - start);
+#else
   	  printf ("/on_failure_jump to %d", p + mcnt - start);
+#endif
           break;
 
 	case on_failure_keep_string_jump:
           extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/on_failure_keep_string_jump to %t", p + mcnt - start);
+#else
   	  printf ("/on_failure_keep_string_jump to %d", p + mcnt - start);
+#endif
           break;
 
 	case dummy_failure_jump:
           extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/dummy_failure_jump to %t", p + mcnt - start);
+#else
   	  printf ("/dummy_failure_jump to %d", p + mcnt - start);
+#endif
           break;
 
 	case push_dummy_failure:
@@ -792,43 +808,71 @@
 
         case maybe_pop_jump:
           extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/maybe_pop_jump to %t", p + mcnt - start);
+#else
   	  printf ("/maybe_pop_jump to %d", p + mcnt - start);
+#endif
 	  break;
 
         case pop_failure_jump:
 	  extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/pop_failure_jump to %t", p + mcnt - start);
+#else
   	  printf ("/pop_failure_jump to %d", p + mcnt - start);
+#endif
 	  break;
 
         case jump_past_alt:
 	  extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/jump_past_alt to %t", p + mcnt - start);
+#else
   	  printf ("/jump_past_alt to %d", p + mcnt - start);
+#endif
 	  break;
 
         case jump:
 	  extract_number_and_incr (&mcnt, &p);
+#ifdef _LIBC
+  	  printf ("/jump to %t", p + mcnt - start);
+#else
   	  printf ("/jump to %d", p + mcnt - start);
+#endif
 	  break;
 
         case succeed_n:
           extract_number_and_incr (&mcnt, &p);
 	  p1 = p + mcnt;
           extract_number_and_incr (&mcnt2, &p);
+#ifdef _LIBC
+	  printf ("/succeed_n to %t, %d times", p1 - start, mcnt2);
+#else
 	  printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
+#endif
           break;
 
         case jump_n:
           extract_number_and_incr (&mcnt, &p);
 	  p1 = p + mcnt;
           extract_number_and_incr (&mcnt2, &p);
+#ifdef _LIBC
+	  printf ("/jump_n to %t, %d times", p1 - start, mcnt2);
+#else
 	  printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
+#endif
           break;
 
         case set_number_at:
           extract_number_and_incr (&mcnt, &p);
 	  p1 = p + mcnt;
           extract_number_and_incr (&mcnt2, &p);
+#ifdef _LIBC
+	  printf ("/set_number_at location %t to %d", p1 - start, mcnt2);
+#else
 	  printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
+#endif
           break;
 
         case wordbound:
@@ -895,7 +939,11 @@
       putchar ('\n');
     }
 
+#ifdef _LIBC
+  printf ("%t:\tend of pattern.\n", p - start);
+#else
   printf ("%d:\tend of pattern.\n", p - start);
+#endif
 }
 
 
@@ -914,8 +962,11 @@
       printf ("fastmap: ");
       print_fastmap (bufp->fastmap);
     }
-
+#ifdef _LIBC
+  printf ("re_nsub: %z\t", bufp->re_nsub);
+#else
   printf ("re_nsub: %d\t", bufp->re_nsub);
+#endif
   printf ("regs_alloc: %d\t", bufp->regs_allocated);
   printf ("can_be_null: %d\t", bufp->can_be_null);
   printf ("newline_anchor: %d\n", bufp->newline_anchor);

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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

end of thread, other threads:[~2000-02-28  0:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-25 12:21 Some small fixes Andreas Jaeger
2000-02-25 17:01 ` Ulrich Drepper
2000-02-26  0:16   ` Andreas Jaeger
2000-02-26  0:36   ` Andreas Jaeger
2000-02-28  0:14   ` Andreas Jaeger

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).