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]

Re: i686 bootstrap problem


On Fri, Apr 13, 2001 at 06:44:34PM +0100, Joseph S. Myers wrote:
> > 	* c-common.h (C_PROMOTING_INTEGER_TYPE_P): Add boolean.
> > 	* c-typeck.c (default_conversion): Remove now dead boolean check.
> 
> Can you create a small testcase that shows this problem? 

---
int main()
{
  f1();
  if (f2 ())
    abort ();
  return 0;
}
static long f1() { return -1; }
static _Bool f2() { return 0; }
---

$ gcc -w z.c
$ ./a.out
Aborted (core dumped)
$

If you prototype them, you'll get something self-consistent
which then runs properly on any version.

My guess is that C_PROMOTING_INTEGER_TYPE_P is intending to
implement the integer promotions as defined by 6.3.1.1/2.
If so, we probably ought to be checking for enumerations as
well.  Which would make a difference for -fshort-enums.

Thoughts?


r~


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