[ 
https://issues.apache.org/jira/browse/THRIFT-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169461#comment-14169461
 ] 

Roger Meier commented on THRIFT-2784:
-------------------------------------

Thanks John,
just committed your patch.

lib/cpp/test/Makefile.am is still unable to use -pedantic...becasue of 
enumtest, any idea or additional patch on your side?
{noformat}
../../../compiler/cpp/thrift --gen cpp ../../../test/EnumTest.thrift
/bin/bash ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../.. -I../../../lib/cpp/src/thrift  -I/usr/local/include 
-I../../../lib/cpp/src  -Wall -Wextra -pedantic -g -O2 -std=c++11 -MT 
EnumTest_types.lo -MD -MP -MF .deps/EnumTest_types.Tpo -c -o EnumTest_types.lo 
`test -f 'gen-cpp/EnumTest_types.cpp' || echo './'`gen-cpp/EnumTest_types.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. 
-I../../../lib/cpp/src/thrift -I/usr/local/include -I../../../lib/cpp/src -Wall 
-Wextra -pedantic -g -O2 -std=c++11 -MT EnumTest_types.lo -MD -MP -MF 
.deps/EnumTest_types.Tpo -c gen-cpp/EnumTest_types.cpp  -fPIC -DPIC -o 
.libs/EnumTest_types.o
gen-cpp/EnumTest_types.cpp:96:1: error: zero-size array '_kMyEnum5Values'
gen-cpp/EnumTest_types.cpp:99:1: error: zero-size array '_kMyEnum5Names'
{noformat}

> Eliminate compiler warnings in generated C++ code
> -------------------------------------------------
>
>                 Key: THRIFT-2784
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2784
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>    Affects Versions: 0.9.1
>            Reporter: John Campbell
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: thrift-2784-eliminate_generated_cpp_warnings.patch
>
>
> Generated C++ classes generate compiler warnings when the using code is 
> compiled with -Wall -Wextra -pedantic.
> Specifically, there are two types of warnings in the generated code:
> 1. Exceptions don't call parent constructor
> 2. Unused warnings
> (there may be others in the generated code, however no others have been found 
> at this time)
> Ideally, the generated C++ code should not have these errors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to