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: Patch: format checking const arrays


>>>>> "Joseph" == Joseph S Myers <jsm28@cam.ac.uk> writes:

    Joseph> On Wed, 18 Oct 2000, Mark Mitchell wrote:

    >> We should figure out a way to use decl_constant_value.
    >> Otherwise, we're just replicating the code.

    Joseph> After moving the tests of pedantic to the uses of
    Joseph> decl_constant_value (which is still a misuse of pedantic,

It's probably actually better to make a wrapper function, and call
that.

    Joseph> but makes decl_constant_value closer to being useful
    Joseph> here), the next problem is with the

    Joseph>       && DECL_MODE (decl) != BLKmode)

    Joseph> Would moving that to the places decl_constant_value is
    Joseph> used as well be appropriate?

I think that code is trying to prevent some kind of misoptimization.
I don't think the front ends should really be looking at RTL at all,
so I think that test, at least in its present form, is misguided.  I
would just remove it -- the C++ front-end gets by without it.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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