------- Comment #3 from mikael at gcc dot gnu dot org  2008-12-13 14:29 -------
Both the warning and the temporary creation depend on the same dependency
checking code. 
While it makes sense in the case of pointers to assume the worst (and create a
temporary, even if it's actually not needed), a warning should probably not be
emitted as it would point real problems in very few cases. 

About activating the warning with a flag (-Waliasing?), I would prefer to keep
the warning by default because it does quite a good job in non-pointer cases. 
But I don't feel very strong about it, as in my opinion, -Waliasing too should
be activated by default (are there too many false positive to do so?). 

Apart for cray pointers (see below), I don't think there are other cases where
the warning would be unwanted. 


Some random thoughts, more or less related:
- As far as I know, cray pointers are not supported by the dependency code.
- -Waliasing doesn't support elemental functions, and seems to catch full
arrays only: on elemental_dependency_1.f90, there is only one (false positive)
warning from -Waliasing. 


-- 

mikael at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-13 14:29:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38487

Reply via email to