Giter VIP home page Giter VIP logo

Comments (4)

ellisonch avatar ellisonch commented on August 18, 2024

FWIW,

(char)2352352354 is implementation defined (6.3.1.3 in n1570)
while
INT_MAX + 1 is undefined (6.5:5)

They are two distinct problems. The first is a problem in conversion (and
is not overflow), the second is actual overflow.

-Chucky

On Mon, Oct 19, 2015 at 1:09 PM, Manasvi Saxena [email protected]
wrote:

kcc often lists implementation defined behavior as unspecified. The
difference between the two is documented in C11 sec. 3.4.1 and 3.4.4.

Even though it may not be technically wrong to list implementation defined
behavior as unspecified, kcc should be able to distinguish between the two,
just as the standard does.

Consider for instance error code "CCV1", that has message "signed
overflow". kcc categorizes this as unspecified behavior. C11, on the other
hand, in section 6.3.1.3:3 mentions that the error is implementation
defined. Moreover, sec. J.1:1 (a list of unspecified behaviors encountered
in the standard), does not have the error in its original form.


Reply to this email directly or view it on GitHub
#134.

from c-semantics.

dwightguth avatar dwightguth commented on August 18, 2024

Oh so that's where that is. Thanks, @ellisonch !

I have been trying to figure out where in the standard signed overflow was declared to be undefined for a while now. Without that information I knew what we had was wrong but I didn't really know what to do about it.

Okay, so:

CEMX3, CEA6, CCV1 should be UNDEF 6.5:5
CCV2 should be IMPL 6.3.1.3:3

from c-semantics.

msaxena2 avatar msaxena2 commented on August 18, 2024

So, from what I can see, it looks like we've decided to support this by adding a new Implementation defined error category, which is separate from Unspecified errors. This seems like a reasonable solution.

from c-semantics.

msaxena2 avatar msaxena2 commented on August 18, 2024

Fixed in #131

from c-semantics.

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.