diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2024-05-13 14:02:46 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2024-05-13 14:02:46 +0200 |
commit | c4af8ebdb0318b5e9ed3dfdea5501a3260f3acea (patch) | |
tree | fc4c02972f586e537e24167efe49a1ad2b33a272 /gcc/expr.cc | |
parent | fb1649f8b4ad5043dd0e65e4e3a643a0ced018a9 (diff) | |
download | gcc-c4af8ebdb0318b5e9ed3dfdea5501a3260f3acea.zip gcc-c4af8ebdb0318b5e9ed3dfdea5501a3260f3acea.tar.gz gcc-c4af8ebdb0318b5e9ed3dfdea5501a3260f3acea.tar.bz2 |
testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]
g++.dg/modules/stdio-1_a.H currently FAILs on Solaris:
FAIL: g++.dg/modules/stdio-1_a.H -std=c++17 scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'"
FAIL: g++.dg/modules/stdio-1_a.H -std=c++2a scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'"
FAIL: g++.dg/modules/stdio-1_a.H -std=c++2b scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'"
The problem is that the module file doesn't contain
Depset:0 decl entity:95 function_decl:'::printf'
as expected by the test, but
Depset:0 decl entity:26 function_decl:'::std::printf'
This happens because Solaris <stdio.h> declares printf in namespace std
as allowed by C++11, Annex D, D.5.
This patch allows for both forms.
Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and
x86_64-pc-linux-gnu.
2024-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
PR c++/98529
* g++.dg/modules/stdio-1_a.H (scan-lang-dump): Allow for
::std::printf.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions