tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Annoying new warning


From: Christian Jullien
Subject: Re: [Tinycc-devel] Annoying new warning
Date: Sat, 29 Apr 2017 07:53:52 +0200

No one looking at it? What is the behavior of this test when lower is unitialized?

 

From:  Christian JULLIEN

  Subject:  [Tinycc-devel] Annoying new warning

Date:  Thu, 20 Apr 2017 09:29:31 +0200 (CEST)

 

Trying to build mob on RPI I now get this new warning

 

gcc -c ./lib/libtcc1.c -o libtcc1.o -DTCC_TARGET_ARM -Wall -g -O2 -Wdeclaration-after-statement -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -fno-strict-aliasing -I.  -fPIC

./lib/libtcc1.c: In function __fixunsxfdi:

./lib/libtcc1.c:586:26: warning: dl1.l.upper is used uninitialized in this function [-Wuninitialized]

     if (dl1.l.lower == 0 && dl1.l.upper == 0)

                          ^

 

unsigned long long __fixunsxfdi (long double a1)

{

    register union ldouble_long dl1;

    register int exp;

    register unsigned long long l;

 

    dl1.ld = a1;

 

    if (dl1.l.lower == 0 && dl1.l.upper == 0)

        return (0);

 

 

And union is defined as:

 

/* only for x86 */

union ldouble_long {

    long double ld;

    struct {

        unsigned long long lower;

        unsigned short upper;

    } l;

};


reply via email to

[Prev in Thread] Current Thread [Next in Thread]