diff options
author | Jakub Jelinek <jakub@redhat.com> | 2022-04-08 09:16:30 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-04-08 09:16:30 +0200 |
commit | 6e2743687202c58a6553ae632ebbada3de38ad48 (patch) | |
tree | 8585f448cb48560567f40090918b55b7f86a142f /gcc/config.gcc | |
parent | 5e6597064b0c7eb93b8f720afc4aa970eefb0628 (diff) | |
download | gcc-6e2743687202c58a6553ae632ebbada3de38ad48.zip gcc-6e2743687202c58a6553ae632ebbada3de38ad48.tar.gz gcc-6e2743687202c58a6553ae632ebbada3de38ad48.tar.bz2 |
c: Error on va_arg with function type [PR105149]
In the PR Joseph said that the C standard for va_arg talks about
pointers to object type and as a function type is not object type,
it is invalid.
The following patch diagnoses it in the FE, instead of ICEing later on
when optimizations are turned on (and with -O0 doing something weird
at runtime).
2022-04-08 Jakub Jelinek <jakub@redhat.com>
PR c/105149
* c-typeck.cc (c_build_va_arg): Reject function types.
* gcc.dg/pr105149.c: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions