[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#6047: marked as done ([Fix in {gcc,egcc}-2.91.x] badly initialized union in gcc include file)



Your message dated Thu, 12 Apr 2001 23:52:39 +0200 (MEST)
with message-id <15062.8940.590633.88211@bolero>
and subject line closing gcc272 bugs
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 18 Dec 1996 06:34:57 +0000
Received: (qmail 7609 invoked from network); 18 Dec 1996 06:34:56 -0000
Received: from cartoon.ecn.purdue.edu (branden@128.46.147.13)
  by master.debian.org with SMTP; 18 Dec 1996 06:34:55 -0000
Received: from cartoon.ecn.purdue.edu (branden@localhost)
	by cartoon.ecn.purdue.edu (8.8.4/3.8.2moyman)
	id BAA11843; Wed, 18 Dec 1996 01:34:36 -0500 (EST)
Message-Id: <199612180634.BAA11843@cartoon.ecn.purdue.edu>
From: Branden Robinson <branden@ecn.purdue.edu>
Subject: badly initialized union in gcc include file
To: submit@bugs.debian.org
Date: Wed, 18 Dec 1996 01:34:35 -0500 (EST)
Cc: debian-user@lists.debian.org
Reply-To: branden@purdue.edu
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Package: gcc
Version: 2.7.2.1-2

-- Please describe the problems with the package here

Found a small syntactical blunder in
/usr/lib/gcc-lib/i486-linux/2.7.2.1/include/float.h:

/* float.h */
#ifndef _FLOAT_H___
#define _FLOAT_H___
/* Produced by enquire version 4.3, CWI, Amsterdam */

[...]

   /* Number of base-FLT_RADIX digits in the significand of a long double */
#undef LDBL_MANT_DIG
#define LDBL_MANT_DIG 64
   /* Number of decimal digits of precision in a long double */
#undef LDBL_DIG
#define LDBL_DIG 18
   /* Difference between 1.0 and the minimum long double greater than 1.0 */
#undef LDBL_EPSILON
#ifndef __LDBL_UNION__
#define __LDBL_UNION__
union __convert_long_double {
  unsigned __convert_long_double_i[4];
  long double __convert_long_double_d;
};
#endif
#define LDBL_EPSILON (__extension__ ((union __convert_long_double) {0x0, 0x80000
000, 0x3fc0, 0x0}).__convert_long_double_d)
   /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */
#undef LDBL_MIN_EXP
#define LDBL_MIN_EXP (-16381)
   /* Minimum normalised long double */
#undef LDBL_MIN
#define LDBL_MIN (__extension__ ((union __convert_long_double) {0x0, 0x80000000,
 0x1, 0x0}).__convert_long_double_d)
   /* Minimum int x such that 10**x is a normalised long double */
#undef LDBL_MIN_10_EXP
#define LDBL_MIN_10_EXP (-4931)
   /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */
#undef LDBL_MAX_EXP                                                            
#define LDBL_MAX_EXP 16384                                                     
   /* Maximum long double */                                                   
#undef LDBL_MAX
#define LDBL_MAX (__extension__ ((union __convert_long_double) {0xffffffff, 0xff
ffffff, 0x107ffe, 0x0}).__convert_long_double_d)
   /* Maximum int x such that 10**x is a representable long double */
#undef LDBL_MAX_10_EXP
#define LDBL_MAX_10_EXP 4932

#endif /*  _FLOAT_H___ */

When initializing the int array in the union __convert_long_double, only a
single pair of braces is used, but since initialization rules apply
recursively, a pair is needed for both the union itself and the array.
Without them, innocent programs can generate compiler warnings.

Use the following code, compiled with -Wall, to demonstrate this:

#include <stdio.h>
#include <float.h>

void main(void)
{

/*  These next two lines both generate this message:                           
 *  warning: missing braces around initializer for                             
 *  `(anonymous).__convert_long_double_i'
 */

  printf("long double minimum = %Le\n", LDBL_MIN);
  printf("long double maximum = %Le\n", LDBL_MAX);
}

This is probably something for the upstream maintainer.

-- System Information
Debian Release: 1.2
Kernel Version: Linux apocalypse 2.0.20 #1 Sat Sep 14 04:03:34 EST 1996 i486

Versions of the packages this package depends on:
libc5   Version: 5.4.13-1

-- bug report generated by the debmake bug tool

-- 
 "If a man ate a pound of pasta and a pound of        | G. Branden Robinson
  antipasto, would they cancel out, leaving him       | Purdue University
  still hungry?"    -- Scott Adams                    | branden@purdue.edu
---------------------------------------
Received: (at 6047-done) by bugs.debian.org; 12 Apr 2001 21:58:24 +0000
>From doko@cs.tu-berlin.de Thu Apr 12 16:58:24 2001
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 14np6d-0003Xr-00; Thu, 12 Apr 2001 16:58:24 -0500
Received: from bolero.cs.tu-berlin.de (bolero.cs.tu-berlin.de [130.149.19.1])
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id XAA08192;
	Thu, 12 Apr 2001 23:53:09 +0200 (MET DST)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.9.3+Sun/8.9.3) id XAA19323;
	Thu, 12 Apr 2001 23:52:39 +0200 (MEST)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Thu, 12 Apr 2001 23:52:39 +0200 (MEST)
To: 4429-done@bugs.debian.org, 4430-done@bugs.debian.org,
        4954-done@bugs.debian.org, 5367-done@bugs.debian.org,
        6047-done@bugs.debian.org, 12375-done@bugs.debian.org,
        20606-done@bugs.debian.org, 20889-done@bugs.debian.org,
        24788-done@bugs.debian.org, 26100-done@bugs.debian.org,
        34322-done@bugs.debian.org, 48726-done@bugs.debian.org,
        54544-done@bugs.debian.org, 63154-done@bugs.debian.org
Subject: closing gcc272 bugs
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs  Lucid
Message-ID: <15062.8940.590633.88211@bolero>
Delivered-To: 6047-done@bugs.debian.org

gcc272 (2.7.2.3-18) unstable; urgency=low

  * Close all gcc272 in the Debian bug tracking archive. The use of
    gcc272 is deprecated. The only reason it exists is to have a
    compiler for the linux kernel 2.0.x.
    The bug reports for gcc272 are still available on
    http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=gcc272&archive=yes
    Closes: #4429, #4430, 4954, #5367, #6047, #12375, #20606, #20889,
    #24788, #26100, #34322, #48726, #54544, #63154.



Reply to: