public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4939: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
@ 2002-06-09 6:09 neil
0 siblings, 0 replies; 4+ messages in thread
From: neil @ 2002-06-09 6:09 UTC (permalink / raw)
To: David.Billinghurst, gcc-bugs, gcc-prs, jsm28, zack
Synopsis: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
State-Changed-From-To: analyzed->closed
State-Changed-By: neil
State-Changed-When: Sun Jun 9 06:09:22 2002
State-Changed-Why:
I believe this is now fixed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4939
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/4939: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
@ 2001-11-20 0:36 jsm28
0 siblings, 0 replies; 4+ messages in thread
From: jsm28 @ 2001-11-20 0:36 UTC (permalink / raw)
To: zack; +Cc: gcc-prs
The following reply was made to PR c/4939; it has been noted by GNATS.
From: jsm28@gcc.gnu.org
To: David.Billinghurst@riotinto.com, gcc-bugs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, jsm28@cam.ac.uk,
nobody@gcc.gnu.org, zack@gcc.gnu.org
Cc:
Subject: Re: c/4939: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
Date: 24 Nov 2001 11:00:40 -0000
Synopsis: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
Responsible-Changed-From-To: unassigned->zack
Responsible-Changed-By: jsm28
Responsible-Changed-When: Sat Nov 24 03:00:39 2001
Responsible-Changed-Why:
The testcase failures are expected until Zack's patch is in.
The deficiencies in Cygwin's <limits.h> - if GCC needs to
use that rather than its own functional <limits.h> - are
for the Cygwin maintainers to deal with, though
fixincludes perhaps ought to fix the problems on existing
versions of Cygwin with deficient headers.
State-Changed-From-To: open->analyzed
State-Changed-By: jsm28
State-Changed-When: Sat Nov 24 03:00:39 2001
State-Changed-Why:
The testcase fails (depending on architecture). This is expected.
Zack asked me to write the testcases; having done so I added them.
http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01411.html
http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01370.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4939&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/4939: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
@ 2001-11-20 0:06 jsm28
0 siblings, 0 replies; 4+ messages in thread
From: jsm28 @ 2001-11-20 0:06 UTC (permalink / raw)
To: David.Billinghurst, gcc-bugs, gcc-gnats, gcc-prs, jsm28, nobody, zack
Synopsis: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
Responsible-Changed-From-To: unassigned->zack
Responsible-Changed-By: jsm28
Responsible-Changed-When: Sat Nov 24 03:00:39 2001
Responsible-Changed-Why:
The testcase failures are expected until Zack's patch is in.
The deficiencies in Cygwin's <limits.h> - if GCC needs to
use that rather than its own functional <limits.h> - are
for the Cygwin maintainers to deal with, though
fixincludes perhaps ought to fix the problems on existing
versions of Cygwin with deficient headers.
State-Changed-From-To: open->analyzed
State-Changed-By: jsm28
State-Changed-When: Sat Nov 24 03:00:39 2001
State-Changed-Why:
The testcase fails (depending on architecture). This is expected.
Zack asked me to write the testcases; having done so I added them.
http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01411.html
http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01370.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4939&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* c/4939: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
@ 2001-11-19 21:36 David.Billinghurst
0 siblings, 0 replies; 4+ messages in thread
From: David.Billinghurst @ 2001-11-19 21:36 UTC (permalink / raw)
To: gcc-gnats; +Cc: jsm28
>Number: 4939
>Category: c
>Synopsis: [cygwin] Failure of test gcc.dg/c99-intconst-1.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 23 21:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: David Billinghurst
>Release: gcc-3.1
>Organization:
>Environment:
i686-pc-cygwin
>Description:
New test gcc.dg/c99-inconst-1.c fails on cygwin. Part of the problem is missing definitions in limits.h. With these fixed, the test still fails with repeated warnings on lines 237 and 238:
/usr/local/src/gcc/gcc/testsuite/gcc.dg/c99-intconst-1.c:237: warning: decimal constant is so large that it is unsigned
/usr/local/src/gcc/gcc/testsuite/gcc.dg/c99-intconst-1.c:237: assignment from incompatible pointer type
A reduced test case that gives the same error is
/* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
#include <limits.h>
/* Assertion that constant C is of type T. */
#define ASSERT_CONST_TYPE(C, T) \
do { \
typedef T type; \
typedef type **typepp; \
typedef __typeof__((C)) ctype; \
typedef ctype **ctypepp; \
typepp x = 0; \
ctypepp y = 0; \
x = y; \
y = x; \
} while (0)
/* (T *) if E is zero, (void *) otherwise. */
#define type_if_not(T, E) __typeof__(0 ? (T *)0 : (void *)(E))
/* (T *) if E is nonzero, (void *) otherwise. */
#define type_if(T, E) type_if_not(T, !(E))
/* Combine pointer types, all but one (void *). */
#define type_comb2(T1, T2) __typeof__(0 ? (T1)0 : (T2)0)
#define type_comb3(T1, T2, T3) type_comb2(T1, type_comb2(T2, T3))
/* (T1 *) if E1, otherwise (T2 *) if E2, otherwise (T3 *) if E3. */
#define first_of3p(T1, E1, T2, E2, T3, E3) \
type_comb3(type_if(T1, (E1)), \
type_if(T2, (!(E1) && (E2))), \
type_if(T3, (!(E1) && !(E2) && (E3))))
#define first_of3(T1, E1, T2, E2, T3, E3) \
__typeof__(*((first_of3p(T1, (E1), T2, (E2), T3, (E3)))0))
/* Types of constants according to the C99 rules. */
#define C99_UNSUF_DEC_TYPE(C) \
first_of3(int, (C) <= INT_MAX, \
long int, (C) <= LONG_MAX, \
long long int, (C) <= LLONG_MAX)
/* Checks that constants have correct type. */
#define CHECK_UNSUF_DEC_TYPE(C) ASSERT_CONST_TYPE((C), C99_UNSUF_DEC_TYPE((C)))
void
foo (void)
{
CHECK_UNSUF_DEC_TYPE(2147483648);
}
The preprocessed source from this is attached:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="l.i"
Content-Disposition: inline; filename="l.i"
# 1 "l.c"
# 1 "<builtin>"
# 1 "<command line>"
# 1 "l.c"
# 1 "/usr/local/obj/gcc/gcc/include/limits.h" 1 3
# 11 "/usr/local/obj/gcc/gcc/include/limits.h" 3
# 1 "/usr/local/obj/gcc/gcc/include/syslimits.h" 1 3
# 1 "/usr/local/obj/gcc/gcc/include/limits.h" 1 3
# 132 "/usr/local/obj/gcc/gcc/include/limits.h" 3
# 1 "/usr/local/lib/gcc-lib/i686-pc-cygwin/3.1/include/limits.h" 1 3
# 132 "/usr/local/lib/gcc-lib/i686-pc-cygwin/3.1/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 133 "/usr/local/lib/gcc-lib/i686-pc-cygwin/3.1/include/limits.h" 2 3
# 133 "/usr/local/obj/gcc/gcc/include/limits.h" 2 3
# 8 "/usr/local/obj/gcc/gcc/include/syslimits.h" 2 3
# 12 "/usr/local/obj/gcc/gcc/include/limits.h" 2 3
# 8 "l.c" 2
# 50 "l.c"
void
foo (void)
{
int int_max = 2147483647;
do { typedef __typeof__(*((__typeof__(0 ? (__typeof__(0 ? (int *)0 : (void *)(!(((((2147483648)) <= 2147483647))))))0 : (__typeof__(0 ? (__typeof__(0 ? (long int *)0 : (void *)(!((!((((2147483648)) <= 2147483647)) && ((((2147483648)) <= 2147483647L)))))))0 : (__typeof__(0 ? (long long int *)0 : (void *)(!((!((((2147483648)) <= 2147483647)) && !((((2147483648)) <= 2147483647L)) && ((((2147483648)) <= 9223372036854775807LL)))))))0))0))0)) type; typedef type **typepp; typedef __typeof__(((2147483648))) ctype; typedef ctype **ctypepp; typepp x = 0; ctypepp y = 0; x = y; y = x; } while (0);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-09 13:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-09 6:09 c/4939: [cygwin] Failure of test gcc.dg/c99-intconst-1.c neil
-- strict thread matches above, loose matches on Subject: below --
2001-11-20 0:36 jsm28
2001-11-20 0:06 jsm28
2001-11-19 21:36 David.Billinghurst
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).