Consider: demo.c: In function 'test': demo.c:5:40: error: macro "LOG_2" requires 3 arguments, but only 2 given 5 | LOG_2 ("loading file: %s\n", filename); | ^ This patch adds a note showing the definition of the macro in question, giving: demo.c: In function 'test': demo.c:5:40: error: macro "LOG_2" requires 3 arguments, but only 2 given 5 | LOG_2 ("loading file: %s\n", filename); | ^ In file included from demo.c:1: logging.h:1: note: macro "LOG_2" defined here 1 | #define LOG_2(FMT, ARG0, ARG1) do { fprintf (stderr, (FMT), (ARG0), (ARG1)); } | gcc/testsuite/ChangeLog: * g++.dg/diagnostic/macro-arg-count.C: Move to... * c-c++-common/cpp/macro-arg-count-1.c: ...here, generalizing output for C vs C++. Expect notes showing the definitions of the macros. * c-c++-common/cpp/macro-arg-count-2.c: New test, adapted from the above. libcpp/ChangeLog: * macro.c (_cpp_arguments_ok): If the argument count is wrong, add a note showing the definition of the macro. From-SVN: r265040
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
include | Loading commit data... | |
po | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.jit | Loading commit data... | |
Makefile.in | Loading commit data... | |
aclocal.m4 | Loading commit data... | |
charset.c | Loading commit data... | |
config.in | Loading commit data... | |
configure | Loading commit data... | |
configure.ac | Loading commit data... | |
directives-only.c | Loading commit data... | |
directives.c | Loading commit data... | |
errors.c | Loading commit data... | |
expr.c | Loading commit data... | |
files.c | Loading commit data... | |
identifiers.c | Loading commit data... | |
init.c | Loading commit data... | |
internal.h | Loading commit data... | |
lex.c | Loading commit data... | |
line-map.c | Loading commit data... | |
location-example.txt | Loading commit data... | |
macro.c | Loading commit data... | |
makeucnid.c | Loading commit data... | |
mkdeps.c | Loading commit data... | |
pch.c | Loading commit data... | |
symtab.c | Loading commit data... | |
system.h | Loading commit data... | |
traditional.c | Loading commit data... | |
ucnid.h | Loading commit data... | |
ucnid.tab | Loading commit data... |