include: Remove SECP256K1_GNUC_PREREQ macro
What changed, and why it matters
This commit removes an unused internal compiler-version-checking helper macro from the public header file. It is a cleanup change with no security implications. The commit message notes it is technically a breaking change for any external code that might have relied on this macro, but the authors do not expect such usage.
No security action needed. Reviewers may want to confirm the macro is genuinely unused in downstream projects if API compatibility is a concern.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the SECP256K1_GNUC_PREREQ macro definition from include/secp256k1.h. The macro was used to test whether the compiler was GCC at least at a specified major.minor version. It is no longer referenced anywhere in the codebase, so it is being removed as dead code. There is no functional, cryptographic, or memory-safety change.
Changed components
include/secp256k1.hInspect captured patch +0 / −9
diff --git a/include/secp256k1.h b/include/secp256k1.h
index 0fa4d67..984972c 100644
--- a/include/secp256k1.h
+++ b/include/secp256k1.h
@@ -101,15 +101,6 @@ typedef int (*secp256k1_nonce_function)(
unsigned int attempt
);
-# if !defined(SECP256K1_GNUC_PREREQ)
-# if defined(__GNUC__)&&defined(__GNUC_MINOR__)
-# define SECP256K1_GNUC_PREREQ(_maj,_min) \
- ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
-# else
-# define SECP256K1_GNUC_PREREQ(_maj,_min) 0
-# endif
-# endif
-
/* When this header is used at build-time the SECP256K1_BUILD define needs to be set
* to correctly setup export attributes and nullness checks. This is normally done
* by secp256k1.c but to guard against this header being included before secp256k1.c
Why this scored 16/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.