aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2022-09-01 19:10:59 +0000
committerJoseph Myers <joseph@codesourcery.com>2022-09-01 19:10:59 +0000
commit0a4b219d39c74aec7ebf87ac3be38d8f93efd634 (patch)
tree1d373c6356bce1bebd7d528f04dd1e1dfb9db9e4 /gcc/function.cc
parentd2694766dcfff0278fa93d581340a10b150c0f44 (diff)
downloadgcc-0a4b219d39c74aec7ebf87ac3be38d8f93efd634.zip
gcc-0a4b219d39c74aec7ebf87ac3be38d8f93efd634.tar.gz
gcc-0a4b219d39c74aec7ebf87ac3be38d8f93efd634.tar.bz2
c: C2x removal of unprototyped functions
C2x has completely removed unprototyped functions, so that () now means the same as (void) in both function declarations and definitions, where previously that change had been made for definitions only. Implement this accordingly. This is a change where GNU/Linux distribution builders might wish to try builds with a -std=gnu2x default to start early on getting old code fixed that still has () declarations for functions taking arguments, in advance of GCC moving to -std=gnu2x as default maybe in GCC 14 or 15; I don't know how much such code is likely to be in current use. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c/ * c-decl.cc (grokparms): Handle () in a function declaration the same as (void) for C2X. gcc/testsuite/ * gcc.dg/c11-unproto-3.c, gcc.dg/c2x-unproto-3.c, gcc.dg/c2x-unproto-4.c: New tests. * gcc.dg/c2x-old-style-definition-6.c, gcc.dg/c2x-unproto-1.c, gcc.dg/c2x-unproto-2.c: Update for removal of unprototyped functions.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions