]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Allow pragmas in NSDMIs [PR118147]
authorNathaniel Shead <nathanieloshead@gmail.com>
Fri, 20 Dec 2024 11:09:39 +0000 (22:09 +1100)
committerNathaniel Shead <nathanieloshead@gmail.com>
Fri, 17 Jan 2025 12:50:32 +0000 (23:50 +1100)
commitf3ccc57e5f044031a1b07e79330de9220e93afe7
tree9f1c696d20ea0354128b52ef16b8b8fce11ee343
parent3347ac3cbc7704c7f1d69b6875b65129c6d7dae5
c++: Allow pragmas in NSDMIs [PR118147]

This patch removes the (unnecessary) CPP_PRAGMA_EOL case from
cp_parser_cache_defarg, which currently has the result that any pragmas
in the NSDMI cause an error.

PR c++/118147

gcc/cp/ChangeLog:

* parser.cc (cp_parser_cache_defarg): Don't error when
CPP_PRAGMA_EOL.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/nsdmi-defer7.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
gcc/cp/parser.cc
gcc/testsuite/g++.dg/cpp0x/nsdmi-defer7.C [new file with mode: 0644]