r183881 - Add -Wdeprecated warnings and fixits for things deprecated in C++11:

Reid Kleckner rnk at google.com
Thu Jun 27 14:02:02 PDT 2013


On Thu, Jun 27, 2013 at 1:33 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> I'm not sure how reasonable it is for us to avoid warning on generated
> code; such code frequently contains constructs which would be
> completely unreasonable if manually typed by a human. In this
> particular case the code is somewhat unreasonable even to be produced
> by a machine, and flex should just be fixed -- there is no good reason
> to mark a variable as 'register' any more.


I want to chime in with a bad reason to use the register keyword.  In the
Python interpreter loop, there are variables live across the loop that
should be register allocated.  Many developers are tempted to use them as
out params for routines, thereby taking their addresses and confusing alias
analysis.  If you use the register keyword, they can't take it's address,
thereby avoiding the slowdown.  =P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130627/fce3588d/attachment.html>


More information about the cfe-commits mailing list