GTAO_Booster_PoC
GTAO_Booster_PoC copied to clipboard
[boost.c] is ill-formed (no diagnosis required): The Standard reserves function names beginning with ‘str’ or ‘mem’ for possible future use.
Hi,
Issue:
https://github.com/tostercx/GTAO_Booster_PoC/blob/fd8eaa8661500995442a0fe079b02e740845afe9/boost.c#L33
The name strlen_cached is reserved by the standard.
- §7.1.3 Reserved identifiers p182
- §7.31.12 General utilities <stdlib.h> p456
- §7.31.13 String handling <string.h> p456
NB: Also reserved are… Well, there's a fat list, really. Here is the most useful link you'll ever get for fast reference to the C and C++ Standards and libraries: cppreference.com C Reserved Identifiers
Current Behavior:
Undefined. Any, or none.
Expected Behavior:
The behavior of an identical function given a valid, unreserved, name.
Proposed Solution:
Change the name of the function. eg: cached_strlen
If you read it again, it's called strlen_cacher and not strlen_cached
Yeah, apparently anything starting with str followed by a lowercase letter is reserved for future use, so this would still apply. Had no idea,
Lets just simply call it Superduperwhoopsboopsnonstdcompliant_strlen_cacher 😄 Jokes aside, truly a good first issue.