public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Pta_flags enum overflow in i386.c
@ 2011-07-13 10:31 Igor Zamyatin
  2011-07-13 13:28 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Zamyatin @ 2011-07-13 10:31 UTC (permalink / raw)
  To: gcc

Hi All!

As you may see pta_flags enum in i386.c is almost full. So there is a
risk of overflow in quite near future. Comment in source code advises
"widen struct pta flags" which is now defined as unsigned. But it
looks not optimal.

What will be the most proper solution for this problem?


Thanks in advance,
Igor

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Pta_flags enum overflow in i386.c
  2011-07-13 10:31 Pta_flags enum overflow in i386.c Igor Zamyatin
@ 2011-07-13 13:28 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-07-13 13:28 UTC (permalink / raw)
  To: Igor Zamyatin; +Cc: gcc

Igor Zamyatin <izamyatin@gmail.com> writes:

> As you may see pta_flags enum in i386.c is almost full. So there is a
> risk of overflow in quite near future. Comment in source code advises
> "widen struct pta flags" which is now defined as unsigned. But it
> looks not optimal.
>
> What will be the most proper solution for this problem?

Why is widening pta_flags "not optimal?"

It's hard for me to believe that we still care about bootstrapping a
i386-*-* compiler with a compiler which doesn't support any 64-bit type.
So I don't see any problem with setting need_64bit_hwint=yes in
config.gcc for i386-*-*, changing pta_flags to be unsigned
HOST_WIDE_INT, and letting pta_flags go up to (unsigned HOST_WIDE_INT) 1
<< 63.

If anybody doesn't like that idea, we can simply add a flags2 field and
a pta_flags2 enum with PTA2_xxx constants.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-13 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 10:31 Pta_flags enum overflow in i386.c Igor Zamyatin
2011-07-13 13:28 ` Ian Lance Taylor

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).