Quantcast
Viewing all articles
Browse latest Browse all 627

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

Linus Torvalds writes: (Summary) The silly thing is, the thing we *really* want to know _is_ actually easily accessible during the early parsing, exactly like __builtin_compatible_p(): it's not really that we care about the expressions being constant, as much as the "can this have side effects" question.
effects" question.
We only really use __builtin_constant_p() as a (bad) approximation of that in this case, since it's the best we can do.
that in this case, since it's the best we can do.
So the real use would be to say "can we use the simple direct macro that just happens to also fold into a nice integer constant expression" for __builtin_choose_expr().
expression" for __builtin_choose_expr().
I tried to find something like that, but it really doesn't exist, even though I would actually have expected it to be a somewhat common concern for macro writers: write a macro that works in any arbitrary environment.
environment.
I guess array sizes are really the only true limiting environment (static initia

Viewing all articles
Browse latest Browse all 627

Trending Articles