xsc351072127 commented on PR #2952:
URL: https://github.com/apache/thrift/pull/2952#issuecomment-2254879003
Thanks for reply, I will try to create a issue in Thrift JIRA.
I can provide more infomation about these isse.
1.Yes my production environment is RHEL7 for an old financial system. So I
have no choose to use Centos7 and old version gcc
toolchain because libc and other runtime in OS. I have strictly followed
the "Language requirements" page to build Thtift.
2.I struggle try to know what happen with my compile.
I read a lots of cpp's initialization syntax:
https://en.cppreference.com/w/cpp/language/initialization
https://en.cppreference.com/w/cpp/language/aggregate_initialization
https://en.cppreference.com/w/cpp/language/copy_constructor
(....WTF)
And do some search with some key world, I got a gcc buy bugzilla may be
related, but I am not sure:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53361
I do the minimum reproduction. try the godbolt to get the IR tree. with the
compile options:--std=c++11 -Wall -fno-elide-constructors
```
class uuid
{
public:
//should not declared user constructors
uuid() = default;
int data[16];
};
int main()
{
uuid uuu;
uuid u{uuu};
}
```
https://godbolt.org/z/ehdr1bj5P
For gcc5 and later version compile, will call the default copy constructor
create by compiler, but for gcc4.x will get a compile error.
I do not why, but this is the phenomenon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]