Giter Site home page Giter Site logo

CLANG 9.01 warnings about colm HOT 8 CLOSED

adrian-thurston avatar adrian-thurston commented on June 11, 2024
CLANG 9.01 warnings

from colm.

Comments (8)

adrian-thurston avatar adrian-thurston commented on June 11, 2024

Hi @mingodad, do the changes you made eliminate all these warnings? If so, I will close the issue.

from colm.

mingodad avatar mingodad commented on June 11, 2024

Hello Adrian !
No it doesn't, the ones bellow seems to be generated and I didn't identified then to change, in this case it was an arm64 and looking at this forum http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11308.html they explain this:

There is a difference between a plain char and a signed char. By default a plain char represents an unsigned char value. Using the compiler directive --signed_chars changes the default behaviour of plain char to be a signed char. In µVision this is configured under Project - Options - C/C++ - Plain Char is Signed.

So I think that it would be nice to have this managed transparently between architectures.

/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../src -I../colm  -I../aapl -I../colm/include -DBINDIR='"/data/data/com.termux/files/home/local/colm/bin"'   -Wall -g -MT libragel_la-parsetree.lo -MD -MP -MF .deps/libragel_la-parsetree.Tpo -c -o libragel_la-parsetree.lo `test -f 'parsetree.cc' || echo './'`parsetree.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../src -I../colm -I../aapl -I../colm/include -DBINDIR=\"/data/data/com.termux/files/home/local/colm/bin\" -Wall -g -MT libragel_la-parsetree.lo -MD -MP -MF .deps/libragel_la-parsetree.Tpo -c parsetree.cc  -fPIC -DPIC -o .libs/libragel_la-parsetree.o
parse.c:7973:20: warning: result of comparison of constant -17 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if ( (*pdaRun->p) == -17 )
             ~~~~~~~~~~~~ ^  ~~~
parse.c:7980:20: warning: result of comparison of constant -69 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if ( (*pdaRun->p) == -69 )
             ~~~~~~~~~~~~ ^  ~~~
parse.c:7987:20: warning: result of comparison of constant -65 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if ( (*pdaRun->p) == -65 )
             ~~~~~~~~~~~~ ^  ~~~
parse.c:8001:20: warning: result of comparison of constant -17 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if ( (*pdaRun->p) == -17 )
             ~~~~~~~~~~~~ ^  ~~~
parse.c:8008:20: warning: result of comparison of constant -69 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if ( (*pdaRun->p) == -69 )
             ~~~~~~~~~~~~ ^  ~~~
parse.c:8015:20: warning: result of comparison of constant -65 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if ( (*pdaRun->p) == -65 )
             ~~~~~~~~~~~~ ^  ~~~

Cheers !

from colm.

adrian-thurston avatar adrian-thurston commented on June 11, 2024

Ah, okay. We need to make a configure check and then modify hostTypeC appropriately in main.cc. This should cause the codegen to generate the correct numerical formats.

from colm.

mingodad avatar mingodad commented on June 11, 2024

It seems that the parser.c comes in a kind of tar file, how to update it, or the source of it to generate a cast or non negative values ?

from colm.

adrian-thurston avatar adrian-thurston commented on June 11, 2024

The colm parser is bootstrapped, so you can find the code in the *codegen.cc files. I haven't looked at it lately, but it is roughly broken down into scanner, parser, reduction, loading and top level.

The tarball is there because. I am now trying to follow the rule that each makefile rule generates only one output, which simplifies specifying dependencies.

from colm.

mingodad avatar mingodad commented on June 11, 2024

There is several possible places where it could be generated and with my knowledge of this code base I'm not sure which of then is it.
Could you have a look at it ?

from colm.

adrian-thurston avatar adrian-thurston commented on June 11, 2024

For sure, I'm not able to until Monday though.

from colm.

adrian-thurston avatar adrian-thurston commented on June 11, 2024

Last warnings are related to alphabet signedness and really stem from a bigger issue. Need to lock down the alphabet as unsigned char. Closing this one here and the issue lives on in #104

from colm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.