Patch: format checking const arrays

Mark Mitchell
Wed Oct 18 19:07:00 GMT 2000

>>>>> "Joseph" == Joseph S Myers <> 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

    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         
CodeSourcery, LLC     

More information about the Gcc-patches mailing list