https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96247

--- Comment #2 from hujp <hujiangping at cn dot fujitsu.com> ---
(In reply to Richard Biener from comment #1)
> not sure if that's sensible or if instead zero should be rejected.  Note
> x86_64 behaves the same so it's probably better to adjust the documentation
> to reflect the implementation behavior.
Thanks, Richard.

Yes, I confirmed that x86_64 have the same problem in the source level.

>From the point of view of the function of the option, it is meaningless to
align with 0, so for -falign-function=0, 
  - either has a special meaning, that is, use the default value (that is, the
document now says), 
  - or should be rejected. 
I prefer the latter, if that don't need to modify the target code (for now, I
haven't confirmed the relevant code). It means that both the code and the
documentation need to be modified a bit.

On the other hand, just adjusting the documentation to reflect the
implementation behavior will cause -falign-functions=0 and -falign-functions=1
to have the same meaning, which is a bit confusing from the user's perspective.

What do you think?

Reply via email to