Skip to content

Commit 1eaca90

Browse files
authored
Merge pull request #2389 from jwillemsen/jwi-vs2022bug
Add new compiler test to reproduce issue
2 parents 359fbc2 + e37b744 commit 1eaca90

4 files changed

Lines changed: 55 additions & 2 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* This program reproduces an compiler issue with Visual Studio 2022
3+
*/
4+
5+
#include "test_config.h"
6+
#include <array>
7+
#include <string>
8+
9+
namespace Test
10+
{
11+
using arrayofstring = std::array<std::string, 5>;
12+
13+
class unionarrayofstring
14+
{
15+
public:
16+
unionarrayofstring () = default;
17+
unionarrayofstring (const unionarrayofstring&) = delete;
18+
unionarrayofstring (unionarrayofstring&&) = delete;
19+
inline ~unionarrayofstring () {}
20+
unionarrayofstring& operator= (const unionarrayofstring&) = delete;
21+
unionarrayofstring& operator= (unionarrayofstring&&) = delete;
22+
23+
private:
24+
union u_type_
25+
{
26+
u_type_ () = default;
27+
~u_type_ () {}
28+
::Test::arrayofstring as_{};
29+
} u_{};
30+
};
31+
}
32+
33+
int run_main (int, ACE_TCHAR*[])
34+
{
35+
ACE_START_TEST (ACE_TEXT ("Compiler_Features_42_Test"));
36+
37+
::Test::unionarrayofstring p;
38+
39+
ACE_END_TEST;
40+
41+
return 0;
42+
}

ACE/tests/run_test.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Compiler_Features_38_Test
112112
Compiler_Features_39_Test
113113
Compiler_Features_40_Test
114114
Compiler_Features_41_Test
115+
Compiler_Features_42_Test
115116
Config_Test: !LynxOS !VxWorks !ACE_FOR_TAO
116117
Conn_Test: !ACE_FOR_TAO
117118
DLL_Test: !STATIC

ACE/tests/tests.mpc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,17 @@ project(Compiler_Features_41_Test) : acetest {
863863
}
864864
}
865865

866+
project(Compiler_Features_42_Test) : acetest {
867+
exename = Compiler_Features_42_Test
868+
Source_Files {
869+
Compiler_Features_42_Test.cpp
870+
}
871+
// Visual Studio 2019/2022 give an internal compiler error when using C++17 (the default for ACE)
872+
specific(vs2019,vs2022) {
873+
LanguageStandard = stdcpp20
874+
}
875+
}
876+
866877
project(Config Test) : acetest {
867878
avoids += ace_for_tao
868879
exename = Config_Test

TAO/tao/AnyTypeCode/TypeCode_Case_T.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ namespace TAO
3636
*
3737
* A @c Case_T contains the corresponding case label value, name and
3838
* pointer to the @c CORBA::TypeCode for a given OMG IDL @c union
39-
* @c case. For
40-
* example, the cases in following OMG IDL @c union:
39+
* @c case. For example, the cases in following OMG IDL @c union:
4140
*
4241
* \code
4342
* union Foo switch (short)

0 commit comments

Comments
 (0)