As noted in the comments, there is no significant difference between the standard example and your example. Compilers that properly implement the standard release are diagnostic for both.
The fact that this is clearly a compiler error, at least clang, and Intel can be seen when you edit this example for meaningless
namespace A { extern "C" void f(int = 5); } namespace B { extern "C" void f(int = 3);
Despite receiving two different arguments by default, no error or even warning occurs. One of the default arguments is used, the first with Intel, the second with clang.
GCC really rejects this senseless example, so there is no simple and easy way to verify that it is clearly a mistake in GCC, but this does not change the fact that it is: as noted, it silently accepts an example from the standard, where the standard indicates where an error should be detected.
hvd
source share