This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c/19881] strange warning about alloca


------- Additional Comments From bruno at clisp dot org  2005-02-10 21:43 -------
The warning is not correct because 
  1) The code snippet uses alloca() and variable-size arrays for their respective purpose: 
     alloca() for storage that persists until the end of the function, and variable-size arrays 
     for storage that persists until the end of the block. 
  2) In the above sample, all 2 alloca() blocks and 2 variable-size arrays terminate their 
    lifetime at the same instruction. There are no instructions after the bar(...) function call 
    return; therefore a warning about a possible accidental use of the type_temp memory after 
    this point is pointless: the compiler could determine that there are no instructions any more. 
 
We are asking for an easy way to turn off this warning, so that we can look at other, useful, 
warnings. 
 
This is not duplicate of PR 14236, but rather a complaint about the implementation of the fix 
of PR 14236. 
 

-- 


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


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