Coder Social home page Coder Social logo

Comments (7)

eyalroz avatar eyalroz commented on July 20, 2024

If you add

should_skip_normalization = true;

within the if (abs_number == 0.0) { block (line 629), does that make the warning go away?

from printf.

mickjc750 avatar mickjc750 commented on July 20, 2024

No, the warning remains.

The if block at 630-658 will either assign exp10=0, or assign a value to normalization.raw_factor. With exp10==0 the should_skip_normalization boolean will be true, and get_normalized_components() will not be executed.

So the warning is not a real threat. I propose we just add an initializer to the declaration of 'normalization' on line 625.

from printf.

mickjc750 avatar mickjc750 commented on July 20, 2024

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

Michael, please don't reply with a huge quotation block, that's useless for these bug pages. Just your reply, and nothing else please...

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

Do we know if the warning is a real threat?

We know that it is not. normalization is only used if it is initialized. It's a compiler bug for not noticing this.

maybe we just init on line 625 in it's declaration?

I would rather not initialize normalization, since that implies the initializer values might actually get used, which is not the case. Is AVR-GCC special somehow? Is there a precompiler definition I could use to identify it to special-case it?

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

@mickjc750 : ping.

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

So, this is a compiler bug. The value cannot be used uninitialized. MSVC also fails to realize this.

Closing for now.

from printf.

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.