C secp256k1 : ec_pubkey_parse successful on NULL context despite attribute
If you look at the source code, secp256k1_ec_pubkey_parse doesn't actually use its ctx argument.  So no harm is done if it's null.

You can see in the code that there is a VERIFY_CHECK macro to test if ctx is non-null.  However, this is meant only for testing; you can see in util.h that nothing is actually done about the test unless the VERIFY macro is defined, which presumably is only the case for test builds.

The SECP256K1_ARG_NONNULL macro, defined here, uses the GCC function attribute mechanism to tell the compiler that this argument is supposed to be non-null.  The compiler will optimize on this basis.  It can try to issue a warning if it can determine, at compile time, that the argument is null; but only if you use the -Wnonnull option.