public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h
@ 2004-08-10 10:09 jan dot h dot d at swipnet dot se
  2004-08-10 10:18 ` [Bug libc/316] " jan dot h dot d at swipnet dot se
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jan dot h dot d at swipnet dot se @ 2004-08-10 10:09 UTC (permalink / raw)
  To: glibc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4564 bytes --]

Glibc CVS checked out at 12:02, 10 Aug, 2004.

Configure command:
% ../glibc-2.3.3/configure --prefix=/usr --enable-add-ons=nptl --with-tls

% gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --prefix=/usr --enable-shared
--with-gnu-as --with-gnu-ld --enable-threads
Thread model: posix
gcc version 3.4.1

% ld -v
GNU ld version 2.15.90.0.1.1 20040303
Host type: i686-pc-linux-gnu
System: Linux gaffa 2.6.7 #11 Sat Jul 24 00:06:03 CEST 2004 i686 unknown unknown
GNU/Linux
Architecture: i686

% as -v
GNU assembler version 2.15.90.0.1.1 (i386-redhat-linux-gnu) using BFD version
2.15.90.0.1.1 20040303

% /lib/libc.so.6 
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.2.2.
Compiled on a Linux 2.4.19 system on 2003-03-29.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.

Description:
	When compiling I get these errors:

gcc argp-fmtstream.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrit
e-strings -g -mpreferred-stack-boundary=2  -fexceptions   -I../include -I. -I/ho
me/jhd/build/obj-cvs/argp -I.. -I../libio -I../nptl -I/home/jhd/build/obj-cvs -I
../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdep
s/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthre
ad -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../
nptl/sysdeps/i386/i686 -I../nptl/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386/
i686 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps
/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I..
/sysdeps/unix/sysv/i386/i686 -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv 
-I../sysdeps/unix/i386/i686 -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdep
s/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486
 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdep
s/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysd
eps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/ge
neric -I /lib/modules/2.6.7/build/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -i
nclude ../include/libc-symbols.h       -o /home/jhd/build/obj-cvs/argp/argp-fmts
tream.o -MD -MP -MF /home/jhd/build/obj-cvs/argp/argp-fmtstream.o.dt -MT /home/j
hd/build/obj-cvs/argp/argp-fmtstream.o
argp-fmtstream.c: In function `__argp_fmtstream_free':
argp-fmtstream.c:109: error: ogiltiga operander till binär -
argp-fmtstream.c: In function `__argp_fmtstream_update':
argp-fmtstream.c:302: error: ogiltiga operander till binär -
argp-fmtstream.c: In function `__argp_fmtstream_ensure':
argp-fmtstream.c:371: error: ogiltiga operander till binär -

The macro for fwrite_unlocked in libio/bits/stdio.h fails to put its argument n
within parantesis at the penultimate line:

...
                        /* Evaluate all parameters once.  */                  \
                     ? ((void) (ptr), (void) (stream), (void) (size),         \
                        (size_t) n)                                           \
                     : fwrite_unlocked (ptr, size, n, stream))))

so (size_t) n gets expanded to 
  (size_t) fs->p - fs->buf
which turns into a binary - with incompatible operands.

-- 
           Summary: Compile error in argp-fmtstream.c due to bad macro in
                    stdio.h
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: jan dot h dot d at swipnet dot se
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/316] Compile error in argp-fmtstream.c due to bad macro in stdio.h
  2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
@ 2004-08-10 10:18 ` jan dot h dot d at swipnet dot se
  2004-08-10 12:36 ` jakub at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jan dot h dot d at swipnet dot se @ 2004-08-10 10:18 UTC (permalink / raw)
  To: glibc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]


------- Additional Comments From jan dot h dot d at swipnet dot se  2004-08-10 10:18 -------
Sorry for the swedish error messages, "ogiltiga operander till binär -" means
"illegal operands to binary -"



-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/316] Compile error in argp-fmtstream.c due to bad macro in stdio.h
  2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
  2004-08-10 10:18 ` [Bug libc/316] " jan dot h dot d at swipnet dot se
@ 2004-08-10 12:36 ` jakub at redhat dot com
  2004-08-10 17:24 ` jakub at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2004-08-10 12:36 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-08-10 12:36 -------
http://sources.redhat.com/ml/libc-hacker/2004-08/msg00026.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/316] Compile error in argp-fmtstream.c due to bad macro in stdio.h
  2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
  2004-08-10 10:18 ` [Bug libc/316] " jan dot h dot d at swipnet dot se
  2004-08-10 12:36 ` jakub at redhat dot com
@ 2004-08-10 17:24 ` jakub at redhat dot com
  2004-08-10 18:01 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2004-08-10 17:24 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-08-10 17:24 -------
*** Bug 318 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trentalg at aston dot ac dot
                   |                            |uk


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/316] Compile error in argp-fmtstream.c due to bad macro in stdio.h
  2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
                   ` (2 preceding siblings ...)
  2004-08-10 17:24 ` jakub at redhat dot com
@ 2004-08-10 18:01 ` cvs-commit at gcc dot gnu dot org
  2004-08-11  6:07 ` jakub at redhat dot com
  2004-08-11  6:18 ` jakub at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-10 18:01 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-10 18:01 -------
Subject: Bug 316

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2004-08-10 18:01:29

Modified files:
	stdio-common   : Makefile 
	libio/bits     : stdio.h 
Added files:
	stdio-common   : tst-unlockedio.c 

Log message:
	2004-08-10  Jakub Jelinek  <jakub@redhat.com>
	
	* libio/bits/stdio.h (fread_unlocked): Cast 0 to (size_t).
	(fwrite_unlocked): When checking if size * n is <= 8, cast each
	argument to size_t individually.  Cast n to (void) instead of
	(size_t), surround with (), return (size_t) 0 if one of n or size
	is 0.  [BZ #316]
	* stdio-common/Makefile (tests): Add tst-unlockedio.
	* stdio-common/tst-unlockedio.c: New test.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdio-common/tst-unlockedio.c.diff?cvsroot=glibc&r1=NONE&r2=1.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdio-common/Makefile.diff?cvsroot=glibc&r1=1.89&r2=1.90
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/libio/bits/stdio.h.diff?cvsroot=glibc&r1=1.10&r2=1.11



-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/316] Compile error in argp-fmtstream.c due to bad macro in stdio.h
  2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
                   ` (3 preceding siblings ...)
  2004-08-10 18:01 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-11  6:07 ` jakub at redhat dot com
  2004-08-11  6:18 ` jakub at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2004-08-11  6:07 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-08-11 06:07 -------
Fixed in CVS.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/316] Compile error in argp-fmtstream.c due to bad macro in stdio.h
  2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
                   ` (4 preceding siblings ...)
  2004-08-11  6:07 ` jakub at redhat dot com
@ 2004-08-11  6:18 ` jakub at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2004-08-11  6:18 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-08-11 06:18 -------
Argh, meant to close this right away.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=316

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2004-08-11  6:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10 10:09 [Bug libc/316] New: Compile error in argp-fmtstream.c due to bad macro in stdio.h jan dot h dot d at swipnet dot se
2004-08-10 10:18 ` [Bug libc/316] " jan dot h dot d at swipnet dot se
2004-08-10 12:36 ` jakub at redhat dot com
2004-08-10 17:24 ` jakub at redhat dot com
2004-08-10 18:01 ` cvs-commit at gcc dot gnu dot org
2004-08-11  6:07 ` jakub at redhat dot com
2004-08-11  6:18 ` jakub at redhat dot com

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