This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix WINT_TYPE for FreeBSD (ping)


In article <alpine.LSU.1.99.0909121443240.32170@acrux.dbai.tuwien.ac.at>,
Gerald Pfeifer<gerald@pfeifer.com> writes:

> I believe my patch from June still is needed.  The three tests I note
> as fixed below still fail in Loren's test submissions.

> I would propose to apply to GCC 4.4 in addition to HEAD even though
> it changes ABI (but GCC 4.4 has been barely used on FreeBSD so far).

Gerald, if you have been waiting for my approval to commit to
mainline, sorry.  Beyond that: I think that this patch should go
wherever you committed stdint.h support.  -Loren

> ---------- Forwarded message ----------
> From: Gerald Pfeifer <gerald@pfeifer.com>
> To: gcc-patches@gcc.gnu.org, Loren James Rittle <ljrittle@gmail.com>
> Cc: Joseph S. Myers <joseph@codesourcery.com>
> Date: Tue, 2 Jun 2009 11:36:38
> Subject: Fix WINT_TYPE for FreeBSD (was: stdint.h type information needed)

> On Wed, 1 Apr 2009, Joseph S. Myers wrote:
>> Make sure the new c99-stdint-*.c tests pass; if they show up bugs in
>> the system's stdint.h header (as wrapped by GCC with the "wrap" setting) 
>> then report those upstream and fix them in GCC with fixincludes.

> After my patch for stdint.h support on FreeBSD has gone in, we are
> nearly fine on that front.  Nearly, because as we see from

>   http://gcc.gnu.org/ml/gcc-testresults/2009-06/msg00031.html

> gcc.dg/c99-stdint-1.c and gcc.dg/c99-stdint-7.c still fail with

>   .../gcc/testsuite/gcc.dg/c99-stdint-1.c: In function 'test_misc_limits':
>   .../gcc/testsuite/gcc.dg/c99-stdint-1.c:219: error: size of array 'a'is negative

> and

>   .../gcc/testsuite/gcc.dg/c99-stdint-7.c:213: error: #error "WINT_MIN not usable in #if or wrong value"
>   .../gcc/testsuite/gcc.dg/c99-stdint-7.c:216: error: #error "WINT_MAX not usable in #if or wrong value"

> Both of these relate to WINT_MIN and WINT_MAX, and indeed we have

>   WINT_MIN = -2147483648, __WINT_MIN__ = 0
>   WINT_MAX =  2147483647, __WINT_MAX__ = 4294967295


> The patch below fixes this and resolves the following testcases without
> any other regressions on i386-unknown-freebsd7.1:

>   < FAIL: gcc.dg/c99-stdint-1.c (test for excess errors)
>   < FAIL: gcc.dg/c99-stdint-7.c (test for excess errors)
>   < FAIL: gcc.dg/wint_t-1.c (test for excess errors)

> Okay for trunk?  Should this also be applied to open release branches?

> Gerald


> 2009-06-02  Gerald Pfeifer  <gerald@pfeifer.com>
 
> 	* config/freebsd.h: Update comment on types.
> 	(WINT_TYPE): Define.

> Index: config/freebsd.h
> ===================================================================
> --- config/freebsd.h	(revision 148068)
> +++ config/freebsd.h	(working copy)
> @@ -68,11 +68,14 @@
>  #undef  NO_IMPLICIT_EXTERN_C
>  #define NO_IMPLICIT_EXTERN_C	1
 
> -/* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...)  */
> +/* Make GCC agree with FreeBSD's standard headers (<sys/_types.h> etc...)  */
 
>  #undef  WCHAR_TYPE
>  #define WCHAR_TYPE "int"
 
> +#undef  WINT_TYPE
> +#define WINT_TYPE "int"
> +
>  #define MATH_LIBRARY_PROFILE    "-lm_p"
 
>  /* Code generation parameters.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]