[Bug ada/35464] warning: condition is always False not issued inside generics

2008-05-12 Thread charlet at gcc dot gnu dot org


--- Comment #3 from charlet at gcc dot gnu dot org  2008-05-12 22:38 ---
Right, this is really as intended, to avoid too many false positives.
The warning circuitry is not prepared to handle more complex cases,
which would require really a different kind of tool, so is out of the scope
of the front-end.

Arno


-- 

charlet at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX


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



[Bug ada/35464] warning: condition is always False not issued inside generics

2008-03-05 Thread sam at gcc dot gnu dot org


--- Comment #1 from sam at gcc dot gnu dot org  2008-03-05 08:34 ---
Confirmed on GCC 4.4.0 20080303.

I think this warning is disabled on purpose on instances because you may end up
with conditions being always true or false *in somes instances only*. And in
these cases, you certainly do not want the warning to occur, as the code may be
perfectly legit.

Reinstating the warning in instances would require analyzing whether the
current test depends, directly or indirectly, on generic formal parameters, and
issuing the warning only when there are no dependencies. This would require
quite a lot of work to do it properly.


-- 

sam at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||sam at gcc dot gnu dot org
   Severity|minor   |enhancement
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  Known to fail|4.1.2 4.3.0 |4.1.2 4.3.0 4.4.0
   Priority|P3  |P5
   Last reconfirmed|-00-00 00:00:00 |2008-03-05 08:34:58
   date||


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



[Bug ada/35464] warning: condition is always False not issued inside generics

2008-03-05 Thread sam at gcc dot gnu dot org


--- Comment #2 from sam at gcc dot gnu dot org  2008-03-05 08:38 ---
Also note that for the same reason, you will not get a warning from an inlined
body. See sem_warn.adb (Warn_On_Known_Condition).


-- 


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