Sebastian Pop <[EMAIL PROTECTED]> wrote on 19/07/2005 12:58:23:
| Michael Veksler wrote:
| > This is problematic:
| > 1. I am not sure it will turn the warning off.
|
| So you don't want a warning that cannot be turned off simply by
| modifying the code.

Most of gcc warnings are like that: you can avoid a warning by
writing your code in a certain way. In most of the cases the
resulting code is clearer than what it would be without
warning avoiding maneuvers.

| Then, I withdraw the patch that I have proposed
| to implement the warning.

Wait not so fast.
1. I am no authority to block other people's enhancements.
   This was not my intention.
2. Can't it be refined? Can't delay the warning to a
   place where code depends on the VRP?
   Example:

   void foo (int N)
   {
     int i;
     int A[123];

     if (N > 123)
        // Will it be eliminated by VRP ?
        printf("N is too big, hope for the best\n");
     for (i = 0; i < N; i++)
       A[i] = ...
   }

  If VRP results in printf being eliminated, only then
  should a warning be emitted.


    Michael

Reply via email to