2 ms·
I think what the author actually wants from (1) is a transformation of common (or maybe all) UB to be more strongly specified as implementation-defined. That c
by loeg 8y ago
I think what the author actually wants from (1) is a transformation of common (or maybe all) UB to be more strongly specified as implementation-defined. That could be reasonable, with specific scope. I'm having trouble determining the proposed scope from the post, though.
(2) seems like it is already specified; the trouble is in determining what "the semantics of the program" are. This relates to (1) although it doesn't seem like the author has a completely solid grasp of the legalities of the language.
- jcranmer 8y agoWhat the author wants, essentially, is to dictate that common disable-UB flags (e.g., -fwrapv, -fno-strict-aliasing) be folded into the C standard. Well, he probably knew that the C standards committee isn't going to accept that, so instead he's trying to "only" disable the bits of undefined behavior that don't screw over the user. Except he doesn't have a good enough grasp of the standard to actually effect proper wording: (1) essentially disables inlining as a side effect, at least if undefined behavior is involved. (2) either is 100% redundant or means that every implementation must strictly execute the C abstract machine with absolutely no optimization permitted. (3) means you can no longer access any type with a char. You also couldn't access the bits of a float by casting to an int.
- vyodaiken 8y agoit's bizarre to me that people make this argument, given the obvious fact that those flags do not prevent optimization or inlining.