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: [PATCH]: begin removing size_int_type


Nathan Sidwell <nathan@codesourcery.com> writes:

| Richard Henderson wrote:
| 
| > Indeed, I would prefer that we move the other direction.  Virtually
| > all invocations of build_int_cst build single-word integers.  It
| > would be nice if, say, build_int_cst took one HOST_WIDE_INT argument
| > and, say, build_int_cst_wide took the full two integer arguments.
| this patch changes the interface so that,
| * build_int_cst takes a single HOST_WIDE_INT that is then sign extended
| * build_int_cstu takes a single unsigned HOST_WIDE_INT that is zero extended
| * build_int_cst_wide takes a pair.

Hmm, the naming looks odd to me.  Why not

  * build_int_cst
  * build_uint_cst
  * build_wide_int_cst

?

| I decided that build_int_cst should always sign extend, rather than examine
| the signedness of the type, because this behaviour matches C itself.

Agreed.

-- Gaby


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