[PATCH] D16771: [ELF] PHDRS linker script command implemented.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 07:26:15 PST 2016


>> > Do not return an undefined value.
>> That was done intentionally. My point was that using of the return value in case of error is also a error (at least for that method), error flag should be checked, value can be accessedm but should not be used in any results because of invalid nature. Undefined value accepts to this requirements.
>> When you look the value of undefined variable it is usually clear it is the one, but defining it to something can hide the actual error.
> Returning an undefined variable is an undefined behavior, no?

Failing to return is. Not sure about returning an uninitialized
variable, but it does look odd.

Cheers,
Rafael


More information about the llvm-commits mailing list