Enforcing the C version in a module should be fine and based on @xkaraman comment is possible, but in core and main (and most of old) modules should not be done till common distros have their supported versions phased out for a while.
C17 was published in 2018, it took some time to implement it and there are several common distros with extended support not having it supported by the default compiler version.