[GitHub] [openoffice] DonLewisFreeBSD opened a new pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [openoffice] DonLewisFreeBSD opened a new pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

GitBox

DonLewisFreeBSD opened a new pull request #93:
URL: https://github.com/apache/openoffice/pull/93


   the most compatible with our old code base rather than relying on the
   compiler default mode.  Compiling in C++11 or newer mode is very noisy
   due to deprecation warnings about our use of std::auto_ptr.  If the
   compiler defaults to C++17 mode or newer, the build would be totally
   broken because std::auto_ptr is removed from C++17.
   
   There is an unknown amount of porting effort needed to convert to
   std::unique_ptr, which has somewhat different semantics and which is
   not available before C++11, which would break building with older versions
   of gcc which default to gnu++98 mode.
   
   std::shared_ptr, might be an alternative since there is a BOOST
   implementation.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [GitHub] [openoffice] DonLewisFreeBSD opened a new pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

Don Lewis-2
On 23 Aug, GitBox wrote:

>
> DonLewisFreeBSD opened a new pull request #93:
> URL: https://github.com/apache/openoffice/pull/93
>
>
>    the most compatible with our old code base rather than relying on the
>    compiler default mode.  Compiling in C++11 or newer mode is very noisy
>    due to deprecation warnings about our use of std::auto_ptr.  If the
>    compiler defaults to C++17 mode or newer, the build would be totally
>    broken because std::auto_ptr is removed from C++17.
>    
>    There is an unknown amount of porting effort needed to convert to
>    std::unique_ptr, which has somewhat different semantics and which is
>    not available before C++11, which would break building with older versions
>    of gcc which default to gnu++98 mode.
>    
>    std::shared_ptr, might be an alternative since there is a BOOST
>    implementation.

This reduction of compiler warnings reduces the size of the build log by
2/3rd when compiling with gcc 6.3.0.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] [openoffice] DonLewisFreeBSD merged pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

GitBox
In reply to this post by GitBox

DonLewisFreeBSD merged pull request #93:
URL: https://github.com/apache/openoffice/pull/93


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] [openoffice] leginee commented on pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

GitBox
In reply to this post by GitBox

leginee commented on pull request #93:
URL: https://github.com/apache/openoffice/pull/93#issuecomment-748299936


   How about we define a stlport::unique_ptr?
   We use
   auto_ptr for older builds and unique_ptr for newer.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] [openoffice] leginee edited a comment on pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

GitBox
In reply to this post by GitBox

leginee edited a comment on pull request #93:
URL: https://github.com/apache/openoffice/pull/93#issuecomment-748299936


   How about we define a stlport::unique_ptr?
   We use
   auto_ptr for older builds and unique_ptr for newer.
   
   but basically I am fine in general with building with gnu++98


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] [openoffice] DonLewisFreeBSD commented on pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

GitBox
In reply to this post by GitBox

DonLewisFreeBSD commented on pull request #93:
URL: https://github.com/apache/openoffice/pull/93#issuecomment-748416075


   > How about we define a stlport::unique_ptr?
   > We use
   > auto_ptr for older builds and unique_ptr for newer.
   
   They are similar but unique_ptr is not a drop in replacement, otherwise they would have kept the same name.  I'm assuming that there would be some amount of porting and testing effort involved in switching.
   
   I don't thing gcc is new enough to support unique_ptr for anything older than CentOS 7.  I'm pretty sure that we would have to switch to a newer version of Visual C++ as well.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] [openoffice] leginee commented on pull request #93: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be

GitBox
In reply to this post by GitBox

leginee commented on pull request #93:
URL: https://github.com/apache/openoffice/pull/93#issuecomment-748442390


   We need to find a method to do the modernization of the code. If we define this in stlport then we would have one place to mess around with. Also the idea is we could keep the support for older compilers while we modernize the code base as long as possible.
   According to [the c++ Reference for auto_ptr](https://www.cplusplus.com/reference/memory/auto_ptr/) the unique_ptr is the replacement:
   
   >Note: This class template is deprecated as of C++11. unique_ptr is a new facility with a similar functionality, but with improved security (no fake copy assignments), added features (deleters) and support for arrays. See unique_ptr for additional information.
   
   If we use fake copy assignments we would need to replace them, while arrays we would not use the unique_ptr anyhow.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]