Hello Joseph, Aldy et al., Attached please find a patch that will fixed the problem below and another problem you mentioned in a previous email (I had used really_constant_p(..) and you mentioned that in C we need to check for INTEGER_CST). Please let me know if I have missed anything else that you mentioned. Thanks, Balaji V. Iyer. > -----Original Message----- > From: Joseph Myers [mailto:joseph@codesourcery.com] > Sent: Tuesday, March 26, 2013 1:05 PM > To: Aldy Hernandez > Cc: Iyer, Balaji V; gcc-patches@gcc.gnu.org > Subject: Re: [patch] cilkplus array notation for C (clean, independent patchset, > take 1) > > On Mon, 25 Mar 2013, Aldy Hernandez wrote: > > > > I always tend to check for a null pointer before I access the fields > > > in the structure. In this case it is unnecessary. In some cases > > > (e.g. find_rank) there is a good chance a null pointer will be > > > passed into the function and we need to check that and reject those. > > > > I think what Joseph is suggesting is that if NULL is not valid, then > > the caller should check this. But if NULL is valid, then it should be > > documented in the function comment at the top. > > The caller should only check it if it's valid in the caller but not the callee. If it's > invalid in the caller as well, neither should check (except maybe in an assertion if > felt appropriate in a particular case). FIXED! > > -- > Joseph S. Myers > joseph@codesourcery.com