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

Mario Emmenlauer edited comment on THRIFT-5350 at 2/17/21, 3:33 PM:
--------------------------------------------------------------------

I'm not sure if I am confused, but in my humble opinion, something is not 
making itself completely clear.

The compiler warning `{{error: comparison is always true due to limited range 
of data type [-Werror=type-limits]}}` seems to say that the {{char}} type would 
always be in the range {{[0, 32]}}. Is that also how you understand the 
warning? If that would be the case, then the logic of that generator would be 
faulty *for your platform*, because it would assume every character is a 
control character. Maybe thrift is just not ready for your platform?

Before jumping to conclusions, it would be important to understand your 
platform better. Can you point to some documentation what the type {{char}} is 
on your platform? What range does it have, or what bit depth?


was (Author: emmenlau):
I'm not sure if I am confused, but in my humble opinion, something is not 
making itself completely clear.

The compiler warning `{{error: comparison is always true due to limited range 
of data type [-Werror=type-limits]}}` seems to say that the {{char}} type would 
always be in the range {{[0, 32]}}. Is that also how you understand the 
warning? If that would be the case, then the logic of that generator may be 
faulty, because it would assume every character is a control character.

Can you point to some documentation what the type {{char}} is on your platform? 
What range does it have, or what bit depth?

> 0.14.0 fails to build on non-x86
> --------------------------------
>
>                 Key: THRIFT-5350
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5350
>             Project: Thrift
>          Issue Type: Bug
>          Components: Delphi - Compiler
>    Affects Versions: 0.14.0
>         Environment: Fedora rawhide
>            Reporter: Orion Poplawski
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> ```
> make[3]: Entering directory '/builddir/build/BUILD/thrift-0.14.0/compiler/cpp'
> g++ -std=c++11 -DHAVE_CONFIG_H -I./src -Wall -Wextra -pedantic -Werror -O2 
> -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe 
> -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 
> -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux 
> -mfloat-abi=hard -c -o src/thrift/generate/thrift-t_delphi_generator.o `test 
> -f 'src/thrift/generate/t_delphi_generator.cc' || echo 
> './'`src/thrift/generate/t_delphi_generator.cc
> src/thrift/generate/t_delphi_generator.cc: In member function 'std::string 
> t_delphi_generator::make_pascal_string_literal(std::string)':
> src/thrift/generate/t_delphi_generator.cc:1066:12: error: comparison is 
> always true due to limited range of data type [-Werror=type-limits]
>  1066 | if( (c >= 0) && (c < 32)) { // convert ctrl chars, but leave UTF-8 
> alone
>  | ~~^~~~
> cc1plus: all warnings being treated as errors
> make[3]: *** [Makefile:1154: src/thrift/generate/thrift-t_delphi_generator.o] 
> Error 1
> ```
>  
> https://koji.fedoraproject.org/koji/taskinfo?taskID=62017099



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to