gold patch committed: Check IOV_MAX
John Reiser
jreiser@bitwagon.com
Wed Mar 9 16:12:00 GMT 2011
More information about the Binutils mailing list
Wed Mar 9 16:12:00 GMT 2011
- Previous message (by thread): gold patch committed: Check IOV_MAX
- Next message (by thread): gold patch committed: Check IOV_MAX
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ian Lance Taylor wrote: > Andreas Schwab <schwab@redhat.com> writes: > >> Ian Lance Taylor <iant@google.com> writes: >>> void >>> File_read::read_multiple(off_t base, const Read_multiple& rm) >>> { >>> + static size_t iov_max = GOLD_IOV_MAX; >> >> const? > > I've written the code this way because IOV_MAX need not be a constant. > It may be a call to sysconf. static size_t const iov_max = GOLD_IOV_MAX; That use of 'const' denotes a property of the local variable 'iov_max' which can be valuable for documentation, maintenance, and optimization. Nothing is implied regarding the initializing expression 'GOLD_IOV_MAX', which may be simple or arbitrarily complicated. If it is desired to emphasize that the expansion of GOLD_IOV_MAX might involve more than literal numeric constants, then perhaps an explicit [and superfluous] cast static size_t const iov_max = (size_t const) GOLD_IOV_MAX; might be appropriate. --
- Previous message (by thread): gold patch committed: Check IOV_MAX
- Next message (by thread): gold patch committed: Check IOV_MAX
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list