You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (Created) (JIRA)" <ji...@apache.org> on 2011/12/12 22:09:31 UTC
[jira] [Created] (THRIFT-1462) add more strict compiler flags
add more strict compiler flags
------------------------------
Key: THRIFT-1462
URL: https://issues.apache.org/jira/browse/THRIFT-1462
Project: Thrift
Issue Type: Sub-task
Reporter: Roger Meier
Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
I would like to introduce additional compiler flags to improve the C++ code quality:
{noformat}
-CXXFLAGS = -Wall
+CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Roger Meier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167841#comment-13167841 ]
Roger Meier commented on THRIFT-1462:
-------------------------------------
I would say *gcc >= 4.4.5* is the starting point, older ones should work as well. I can roll back if users have issues with other platforms or compilers.
>From my perspective, this setting should be suitable for most modern compilers and brings use to a C++ standard conform implementation across all platforms.
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167922#comment-13167922 ]
Jake Farrell commented on THRIFT-1462:
--------------------------------------
This break centos 5.x since gcc version is 4.1.2 by default. Centos 6.x is fine since the default version is 4.4.4.
This also breaks OS X snow leopard which is gcc 4.2.1.
And the CI also failed for Job 233 for this under Thrift-Compiler-Windows.
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Roger Meier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167996#comment-13167996 ]
Roger Meier commented on THRIFT-1462:
-------------------------------------
just committed a fix for MINGW
{noformat}
if MINGW
thrift_CXXFLAGS = -Wall
else
thrift_CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
endif
{noformat}
we probably need more of these checks;-)
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (THRIFT-1462) add more strict compiler flags
Posted by "Roger Meier (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier resolved THRIFT-1462.
---------------------------------
Resolution: Fixed
Assignee: Roger Meier
committed!
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Roger Meier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169757#comment-13169757 ]
Roger Meier commented on THRIFT-1462:
-------------------------------------
Jake, I fully agree with that!
People should be able to use a regular distro with default packages to run Thrift.
Just enabling compiler switch if option is available is the right direction.
I will have a closer look at compiler(gcc,llvm) and version detection macros as soon as I have some time to do so...
contributors, patches are also welcome here.
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168679#comment-13168679 ]
Hudson commented on THRIFT-1462:
--------------------------------
Integrated in Thrift #366 (See [https://builds.apache.org/job/Thrift/366/])
Thrift-1462: add more strict compiler flags
Reverting patch due to it breaking compilers older than 4.4 (os x, centos 5.x, etc)
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168023#comment-13168023 ]
Jake Farrell commented on THRIFT-1462:
--------------------------------------
Instead of adding these checks all over it would probably be better to add one configure check against the compiler version and then add them if its greater than 4.4
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1462) add more strict compiler flags
Posted by "Roger Meier (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier updated THRIFT-1462:
--------------------------------
Attachment: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
any concerns?
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168046#comment-13168046 ]
Hudson commented on THRIFT-1462:
--------------------------------
Integrated in Thrift #364 (See [https://builds.apache.org/job/Thrift/364/])
THRIFT-1462 add more strict compiler flags
FIX: check for MINGW and use reduced compiler flag set for mingw
roger : http://svn.apache.org/viewvc/?view=rev&rev=1213523
Files :
* /thrift/trunk/compiler/cpp/Makefile.am
* /thrift/trunk/configure.ac
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168714#comment-13168714 ]
Hudson commented on THRIFT-1462:
--------------------------------
Integrated in Thrift #367 (See [https://builds.apache.org/job/Thrift/367/])
Thrift-1462: add more strict compiler flags
Reverting MINGW addition for c+++0x
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167930#comment-13167930 ]
Hudson commented on THRIFT-1462:
--------------------------------
Integrated in Thrift #363 (See [https://builds.apache.org/job/Thrift/363/])
THRIFT-1462 add more strict compiler flags(-Wall -Wextra -std=c++0x -pedantic)
roger : http://svn.apache.org/viewvc/?view=rev&rev=1213459
Files :
* /thrift/trunk/compiler/cpp/Makefile.am
* /thrift/trunk/lib/cpp/Makefile.am
* /thrift/trunk/lib/cpp/test/Makefile.am
* /thrift/trunk/test/cpp/Makefile.am
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1462) add more strict compiler flags
Posted by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167826#comment-13167826 ]
Jake Farrell commented on THRIFT-1462:
--------------------------------------
only concern would be breaking older compilers, if we can document a starting version and above for a supported compiler i'm good with this
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (THRIFT-1462) add more strict compiler flags
Posted by "Jake Farrell (Reopened) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell reopened THRIFT-1462:
----------------------------------
Reverted patch as it is breaking build for current systems with default compiler less than 4.4
> add more strict compiler flags
> ------------------------------
>
> Key: THRIFT-1462
> URL: https://issues.apache.org/jira/browse/THRIFT-1462
> Project: Thrift
> Issue Type: Sub-task
> Components: C++ - Compiler, C++ - Library
> Reporter: Roger Meier
> Assignee: Roger Meier
> Attachments: THRIFT-1462_flags_c++0x_pedantic_Wextra.patch
>
>
> I would like to introduce additional compiler flags to improve the C++ code quality:
> {noformat}
> -CXXFLAGS = -Wall
> +CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira