This is the mail archive of the
mailing list for the GCC project.
Re: Help restricting args of an intrinsic function
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Syd Polk <spolk at apple dot com>
- Cc: GCC List <gcc at gcc dot gnu dot org>
- Date: Sat, 31 Jan 2004 07:34:47 +0000 (UTC)
- Subject: Re: Help restricting args of an intrinsic function
- References: <F371467E-5386-11D8-93D6-0003931B8A28@apple.com>
On Fri, 30 Jan 2004, Syd Polk wrote:
> The problem is this:
> const int shift = 3;
> r2 = __rlwimi (r, arg, shift, 5, 8);
So what *is* the specification (language-standard-level) of the valid
arguments? shift here isn't an integer constant expression for C, only
for C++, so presumably you aren't wanting to restrict things to integer
constant expressions. But "anything the compiler can show is constant"
(do you then allow a variable argument to a built-in function as long as
in every call to that function the argument is constant?) isn't a good
specification; with that as a specification, user code could break between
minor releases if a problematic optimisation that code depended on in this
way is disabled.
Joseph S. Myers