aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu/java/security
diff options
context:
space:
mode:
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>2025-10-14 17:50:13 -0700
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>2026-01-28 10:20:38 -0800
commit00956e55dd2fbbee751e953ca2f6b8a87151f85b (patch)
tree55351c7bae1c2fa8fa31c318ba332e576d54e476 /libjava/gnu/java/security
parentbaaa412ae73c12e2e5ea2552534ec42525f6d21e (diff)
downloadgcc-00956e55dd2fbbee751e953ca2f6b8a87151f85b.zip
gcc-00956e55dd2fbbee751e953ca2f6b8a87151f85b.tar.gz
gcc-00956e55dd2fbbee751e953ca2f6b8a87151f85b.tar.bz2
C/C++: Better notification if misused a function like macro [PR102846]
Currently if assert is misused, e.g. like passing to a function like a function pointer, GCC suggests to include assert.h/cassert. But since it is already included that is just a bogus suggestion. Instead we should see if a function-like macro is that same name (in the case of assert it will be), and inform the user that it is being mis-used. PR c++/102846 PR c/102846 gcc/c-family/ChangeLog: * known-headers.cc (macro_like_function_used::macro_like_function_used): New. (macro_like_function_used::~macro_like_function_used): New. * known-headers.h (class macro_like_function_used): New class. gcc/c/ChangeLog: * c-decl.cc (lookup_name_fuzzy): Lookup function-like macro and notify of misuse there. gcc/cp/ChangeLog: * name-lookup.cc (lookup_name_fuzzy): Lookup function-like macro and notify of misuse there. gcc/testsuite/ChangeLog: * c-c++-common/function-like-macro-1.c: New test. * c-c++-common/function-like-macro-2.c: New test. Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Diffstat (limited to 'libjava/gnu/java/security')
0 files changed, 0 insertions, 0 deletions