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 |
---|---|---|
.. | ||
diagnostic-pragma-1.c | Loading commit data... | |
diagnostic-pragma-2.c | Loading commit data... | |
ffile-prefix-map.c | Loading commit data... | |
fmacro-prefix-map.c | Loading commit data... | |
macro-arg-count-1.c | Loading commit data... | |
macro-arg-count-2.c | Loading commit data... | |
normalize-3.c | Loading commit data... | |
openacc-define-1.c | Loading commit data... | |
openacc-define-2.c | Loading commit data... | |
openacc-define-3.c | Loading commit data... | |
openmp-define-1.c | Loading commit data... | |
openmp-define-2.c | Loading commit data... | |
openmp-define-3.c | Loading commit data... | |
pr45457.c | Loading commit data... | |
pr57580.c | Loading commit data... | |
pr58844-1.c | Loading commit data... | |
pr58844-2.c | Loading commit data... | |
pr60400-1.h | Loading commit data... | |
pr60400-2.h | Loading commit data... | |
pr60400.c | Loading commit data... | |
pr63831-1.c | Loading commit data... | |
pr63831-2.c | Loading commit data... | |
pr65238-1.c | Loading commit data... | |
ucnid-2011-1.c | Loading commit data... | |
va-opt-2.c | Loading commit data... | |
va-opt-3.c | Loading commit data... | |
va-opt-error.c | Loading commit data... | |
va-opt-pedantic.c | Loading commit data... | |
va-opt.c | Loading commit data... | |
warning-directive-1.c | Loading commit data... | |
warning-directive-2.c | Loading commit data... | |
warning-directive-3.c | Loading commit data... | |
warning-directive-4.c | Loading commit data... | |
warning-zero-in-literals-1.c | Loading commit data... | |
warning-zero-location-2.c | Loading commit data... | |
warning-zero-location.c | Loading commit data... |