KeDeng has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23064 )

Change subject: [Rocky] avoid -Wpsabi warning in ComputeLowerAndUpperBound
......................................................................


Patch Set 5:

(2 comments)

Thanks for your reviews.

http://gerrit.cloudera.org:8080/#/c/23064/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23064/4//COMMIT_MSG@7
PS4, Line 7: [Rocky] avoid -Wpsabi warning in ComputeLowerAndUpperBound
> nit: title should be 50 chars max.
Done


http://gerrit.cloudera.org:8080/#/c/23064/4//COMMIT_MSG@9
PS4, Line 9: GCC 11.5.0 on Rocky Linux ARM emits a -Wpsabi warning when 
returning
           : std::pair<double, double> from a function in C++17 mode:
           :
           :   kudu/src/kudu/tablet/compaction_policy.cc:304:63: note: parameter
           :   passing for argument of type ‘std::pair<double, double>’ when 
C++17
           :   is enabled changed to match C++14 in GCC 10.1
           :   304 |   std::pair<double, double> ComputeLowerAndUpperBound() 
const {
           :       |                                                            
   ^
           :
           : This stems from ABI changes introduced in GCC 10.0, where types 
like
           : std::pair<double, double> were treated as homogeneous 
floating-point
           : aggregates (HFAs) under AArch64. In GCC 10.1, the behavior was 
reverted
           : to match C++14, and a diagnostic warning was added to alert users 
of
           : potential ABI mismatches between compiler versions.
           :
           : In Kudu, the affected function ComputeLowerAndUpperBound() is 
internal
           : and not externally visible, so the risk of real ABI breakage is 
low.
           : However, to silence the warning and avoid any future ambiguity, 
this
           : patch replaces the std::pair return type with a custom BoundRange 
struct.
           :
           : Older compilers already treated such a struct as an HFA, so this 
change
           : makes the ABI consistent across versions. With newer compilers, the
           : generated code is unchanged. With older compilers, the function 
may pass
           : the return value through a different register, that does not affect
           : correctness.
           :
           : Build environment:
           : - GCC version: 11.5.0 20240719 (Red Hat 11.5.0-5)
           : - ld (GNU gold) version: 1.16
> nit: commit message lines should be 72 chars max
Done



--
To view, visit http://gerrit.cloudera.org:8080/23064
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iab4db585a8eaf152f1fa2884e72e38a4e7c5efa1
Gerrit-Change-Number: 23064
Gerrit-PatchSet: 5
Gerrit-Owner: KeDeng <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>
Gerrit-Comment-Date: Wed, 25 Jun 2025 10:52:04 +0000
Gerrit-HasComments: Yes

Reply via email to