Remix.run Logo
▲ bluGill 5 hours ago

It compilers on the current gcc version (or at least the one you tested). Future gcc can make it an error.

▲nickorlow 5 hours ago | parent | next [-]

Yes, though that wouldn't be consistent w/ the standard

▲bluGill 5 hours ago | parent [-]

The standard doesn't require compilers find all such cases. The standard allows it, but doesn't require it. There are many known cases where the compiler cannot find a case (at least not in a reasonable amount of time)

▲nickorlow 5 hours ago | parent [-]

The consequence of not being required in the standard is that compilers may not implement it and if they do, they will likely have different implementations/functionality

▲cyberax 3 hours ago | parent | prev [-]

That's like compiling with -Wall. Stuff will keep breaking randomly, so people will just disable it.

▲bluGill an hour ago | parent [-]

Some people. Most projects I know of build -Wall and fix all the errors. Developers all run - Error. 30 years ago this was madness but compilers are good about fixing false positives and so it is reasonable.

It isn't reasonable to expect downstream (i.e. Debian) to fix warnings but developers generally do for code they maintain.