Comments (4)
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.
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.
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.
Fixed in #131
from c-semantics.
Related Issues (20)
- Referring to an object outside of its lifetime.
- Destruction HOT 1
- Default argument conversion
- Aggregate initialization bug
- `<references>` cell garbage collection HOT 1
- Throwing an exception containing a member HOT 1
- Uncaught exception: abort() called but not implicitly defined
- Deviation from Norrish's semantics for the simple assignment operator HOT 2
- Comma operator in C semantics
- C union member problem HOT 1
- C `sizeof(struct)` - bad order of evaluation
- INSTALL.md#from-scratch Should `liblocal-lib-perl` be included in the packages to install
- make fails on in docker container HOT 1
- Do not supress linking errors
- Linking should fail when a static function is used but not declared
- Linking should fail when `main` is defined both in C and C++.
- Union bug HOT 1
- cannot compile HOT 1
- Cannot run kcc script due to a current profile missing HOT 4
- after kcc, a.out can't run HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c-semantics.