This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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,wip] warn on noncontiguous pointers


On 09/30/2018 11:12 AM, Thomas Koenig wrote:
> Am 28.09.18 um 07:12 schrieb Bader, Reinhold:
>>   Looking at 5.3.8.1 (Fortran 2008 for the sake of this discussion),
>> we have that
>> an object that has the DIMENSION attribute is an array. array-spec
>> includes deferred-shape-spec-list,
>> so any object declared with deferred shape is an array.
> 
> OK, I see, so this code is indeed legal.  Thanks!
> 
> @Cesar:  The idea behind your patch is sound.  I think this would
> fit into the "legal, but can sometimes bite you" category,
> so I think would be better with -Wextra (where we accept that
> there might be quite a few false positives).
> 
> Could you adapt your patch accordingly and also add two test cases,
> one testing for the absence of the warning/error with normal
> options, and one for the warning with -Wextra?

Yes, sure.

Thanks,
Cesar


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