Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
an example code of TPOP(the practice of programming),why cannot lookup
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="David Thompson, post: 2896729"] In C99 not actually UB; instead either an implementation-defined conversion or an implementation-defined signal is raised. This is still unportable, but not the full evil of UB. s/could/must/ as size_t must be unsigned and %d expects signed. However, if size_t happens to be unsigned int it _probably_ works. For a user-written vararg function, substituting for a signed int an unsigned int with a value in the range of signed int -- and here the value is 99 which is portably within range -- is guaranteed. There is no explicit provision this works for non-user-written sprintf, but generally it uses the same mechanism(s) and does. OTOH size_t can be an unsigned type other than (and larger than) unsigned int, and then it probably won't work and is definitely UB. - formerly david.thompson1 || achar(64) || worldnet.att.net [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
an example code of TPOP(the practice of programming),why cannot lookup
Top