c++ module error

# first stage

10.1 Module units and purviews [module.unit] C++N4910:2022 (130) p247.cpp

https://qiita.com/kaizen_nagoya/items/27a8021efc84cfe90ee7

## 編纂器(Compiler)
### clang++ --version
> Debian clang version 14.0.5-++20220610033153+c12386ae247c-1~exp1~20220610153237.151
Target: x86_64-pc-linux-gnu, Thread model: posix, InstalledDir: /usr/bin

### g++- --version
> g++ (GCC) 12.1.0  Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# 10.1 Module units and purviews [module.unit] C++N4910:2022 (130) p247.cpp

## 算譜(source code)

```c++:p247.cpp
export module A;
export import :Foo;
export int baz();
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "10.1 Module units and purviews [module.unit] C++N4910:2022 (130) p247.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. Ogawa Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// Example 1  
// Translation unit #1:
     export module A;
     export import :Foo;
     export int baz();
/* Translation unit #2:
     export module A:Foo;
     import :Internals;
     export int foo() { return 2 * (bar() + 1); }
Translation unit #3:
     module A:Internals;
     int bar();
Translation unit #4:
     module A;
     import :Internals;
     int bar() { return baz() - 10; }
     int baz() { return 30; }
*/
// [Example 2:
// Translation unit #1:
  module B:Y;
  int y();
/* Translation unit #2:
  export module B;
  import :Y;
  int n = y();
Translation unit #3:
  module B:X1;
  int &a = n;
Translation unit #4:
  module B:X2;
  import B;
  int &b = n;
Translation unit #5:
  module B;
  int &c = n;
*/ 
// does not implicitly import B
// OK, does not create interface dependency cycle
// does not implicitly import B // error: n not visible here
// does not implicitly import B // OK
// implicitly imports B // OK
int main(){
  cout  <<  n4910 << endl;
  return EXIT_SUCCESS;
}
```

## Script

```bash:clgc.sh
#!/bin/sh
rm $1l
rm $1g
echo "$ clang++ $1.cpp -std=03 -o $1l -I. -Wall" 
clang++ $1.cpp -std=c++03 -o $1l -I. -Wall
if [  -e $1l ]; then
./$1l 
fi
rm $1l
echo "$ clang++ $1.cpp -std=2b -o $1l -I. -Wall"
clang++ $1.cpp -std=c++2b -o $1l -I. -Wall
if [  -e $1l ]; then
./$1l
fi
echo "\r"
echo "$ g++ $1.cpp -std=03 -o $1g -I. -Wall"
g++ $1.cpp -std=c++03 -o $1g -I. -Wall
if [ -e $1g ]; then
./$1g
fi
rm $1g
echo "\r"
echo "$ g++ $1.cpp -std=2b -o $1g -I. -Wall"
g++ $1.cpp -std=c++2b -o $1g -I. -Wall
if [ -e $1g ]; then
./$1g 
fi
```
## 編纂・実行結果(compile and go)

```ubuntu:bash
# g++ p247.cpp p247a.cpp p247b.cpp p247d.cpp -std=c++2b -o p247g -I. -Wall
p247.cpp:26:6: warning: keyword 'export' is enabled with '-fmodules-ts'
   26 |      export module A;
      |      ^~~~~~
p247.cpp:26:13: error: 'module' does not name a type
   26 |      export module A;
      |             ^~~~~~
p247.cpp:26:13: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247.cpp:27:6: warning: keyword 'export' is enabled with '-fmodules-ts'
   27 |      export import :Foo;
      |      ^~~~~~
p247.cpp:27:20: error: found ':' in nested-name-specifier, expected '::'
   27 |      export import :Foo;
      |                    ^
      |                    ::
p247.cpp:27:13: error: 'import' does not name a type
   27 |      export import :Foo;
      |             ^~~~~~
p247.cpp:27:13: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247.cpp:28:6: warning: keyword 'export' is enabled with '-fmodules-ts'
   28 |      export int baz();
      |      ^~~~~~
p247.cpp:44:3: error: 'module' does not name a type
   44 |   module B:Y;
      |   ^~~~~~
p247.cpp:44:3: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247a.cpp:26:6: warning: keyword 'export' is enabled with '-fmodules-ts'
   26 |      export module A:Foo;
      |      ^~~~~~
p247a.cpp:26:13: error: 'module' does not name a type
   26 |      export module A:Foo;
      |             ^~~~~~
p247a.cpp:26:13: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247a.cpp:27:13: error: found ':' in nested-name-specifier, expected '::'
   27 |      import :Internals;
      |             ^
      |             ::
p247a.cpp:27:6: error: 'import' does not name a type
   27 |      import :Internals;
      |      ^~~~~~
p247a.cpp:27:6: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247a.cpp:28:6: warning: keyword 'export' is enabled with '-fmodules-ts'
   28 |      export int foo() { return 2 * (bar() + 1); }
      |      ^~~~~~
p247a.cpp: In function 'int foo()':
p247a.cpp:28:37: error: 'bar' was not declared in this scope
   28 |      export int foo() { return 2 * (bar() + 1); }
      |                                     ^~~
p247a.cpp: At global scope:
p247a.cpp:40:3: warning: keyword 'export' is enabled with '-fmodules-ts'
   40 |   export module B;
      |   ^~~~~~
p247a.cpp:40:10: error: 'module' does not name a type
   40 |   export module B;
      |          ^~~~~~
p247a.cpp:40:10: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247a.cpp:41:10: error: found ':' in nested-name-specifier, expected '::'
   41 |   import :Y;
      |          ^
      |          ::
p247a.cpp:41:3: error: 'import' does not name a type
   41 |   import :Y;
      |   ^~~~~~
p247a.cpp:41:3: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247a.cpp:42:11: error: 'y' was not declared in this scope; did you mean 'yn'?
   42 |   int n = y();
      |           ^
      |           yn
p247b.cpp:26:6: error: 'module' does not name a type
   26 |      module A;
      |      ^~~~~~
p247b.cpp:26:6: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247b.cpp:27:13: error: found ':' in nested-name-specifier, expected '::'
   27 |      import :Internals;
      |             ^
      |             ::
p247b.cpp:27:6: error: 'import' does not name a type
   27 |      import :Internals;
      |      ^~~~~~
p247b.cpp:27:6: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247b.cpp: In function 'int bar()':
p247b.cpp:28:25: error: 'baz' was not declared in this scope; did you mean 'bar'?
   28 |      int bar() { return baz() - 10; }
      |                         ^~~
      |                         bar
p247b.cpp: At global scope:
p247b.cpp:32:3: error: 'module' does not name a type
   32 |   module B:X2;
      |   ^~~~~~
p247b.cpp:32:3: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247b.cpp:33:3: error: 'import' does not name a type
   33 |   import B;
      |   ^~~~~~
p247b.cpp:33:3: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247b.cpp:34:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   34 |   int &b = n;
      |            ^
      |            yn
p247d.cpp:26:3: error: 'module' does not name a type
   26 |   module B;
      |   ^~~~~~
p247d.cpp:26:3: note: C++20 'module' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'
p247d.cpp:27:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   27 |   int &c = n;
      |            ^
      |            yn
# clang++ p247.cpp p247a.cpp p247b.cpp p247d.cpp -std=c++2b -o p247g -I. -Wall -fmodules-ts
p247.cpp:27:20: error: sorry, module partitions are not yet supported
     export import :Foo;
                   ^~~~
p247.cpp:44:11: error: sorry, module partitions are not yet supported
  module B:Y;
          ^~
p247.cpp:44:3: error: translation unit contains multiple module declarations
  module B:Y;
  ^
p247.cpp:26:13: note: previous module declaration is here
     export module A;
            ^
3 errors generated.
p247a.cpp:26:21: error: sorry, module partitions are not yet supported
     export module A:Foo;
                    ^~~~
p247a.cpp:27:13: error: sorry, module partitions are not yet supported
     import :Internals;
            ^~~~~~~~~~
p247a.cpp:28:37: error: use of undeclared identifier 'bar'
     export int foo() { return 2 * (bar() + 1); }
                                    ^
p247a.cpp:40:10: error: translation unit contains multiple module declarations
  export module B;
         ^
p247a.cpp:26:13: note: previous module declaration is here
     export module A:Foo;
            ^
p247a.cpp:41:10: error: sorry, module partitions are not yet supported
  import :Y;
         ^~
p247a.cpp:42:11: error: use of undeclared identifier 'y'
  int n = y();
          ^
6 errors generated.
p247b.cpp:26:14: error: sorry, module partitions are not yet supported
     module A:Internals;
             ^~~~~~~~~~
p247b.cpp:26:6: error: definition of module 'A' is not available; use -fmodule-file= to specify path to precompiled module interface
     module A:Internals;
     ^
p247b.cpp:36:11: error: sorry, module partitions are not yet supported
  module B:X1;
          ^~~
p247b.cpp:36:3: error: translation unit contains multiple module declarations
  module B:X1;
  ^
p247b.cpp:26:6: note: previous module declaration is here
     module A:Internals;
     ^
p247b.cpp:37:12: error: use of undeclared identifier 'n'
  int &a = n;
           ^
5 errors generated.
p247d.cpp:26:3: error: definition of module 'B' is not available; use -fmodule-file= to specify path to precompiled module interface
  module B;
  ^
p247d.cpp:27:12: error: use of undeclared identifier 'n'
  int &c = n;
           ^

# clang++ -c p247.cpp  p247a.cpp p247b.cpp p247d.cpp -std=c++2b  -I. -Wall -fmodule-file=p247
p247.cpp:26:13: error: module declaration must occur at the start of the translation unit
     export module A;
            ^
```

## 検討事項(agenda)
コンパイルエラーの理由を解説する。

# second stage

moduleを先頭行に移動。

```cpp:p247.cpp
export module A;
export import :Foo;
export int baz();
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "10.1 Module units and purviews [module.unit] C++N4910:2022 (130) p247.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. Ogawa Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// Example 1  
/* Translation unit #1:
     export module A;
     export import :Foo;
     export int baz();
   Translation unit #2:
     export module A:Foo;
     import :Internals;
     export int foo() { return 2 * (bar() + 1); }
Translation unit #3:
     module A:Internals;
     int bar();
Translation unit #4:
     module A;
     import :Internals;
     int bar() { return baz() - 10; }
     int baz() { return 30; }
*/
// [Example 2:
// Translation unit #1:
  module B:Y;
  int y();
/* Translation unit #2:
  export module B;
  import :Y;
  int n = y();
Translation unit #3:
  module B:X1;
  int &a = n;
Translation unit #4:
  module B:X2;
  import B;
  int &b = n;
Translation unit #5:
  module B;
  int &c = n;
*/ 
// does not implicitly import B
// OK, does not create interface dependency cycle
// does not implicitly import B // error: n not visible here
// does not implicitly import B // OK
// implicitly imports B // OK
int main(){
  cout  <<  n4910 << endl;
  return EXIT_SUCCESS;
}
```

```cpp:p247a.cpp
export module A:Foo;
export module B;
import :Y;
int n = y();
import :Internals;
export int foo() { return 2 * (bar() + 1); }

#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// Example 1
/* Translation unit #2:
     export module A:Foo;
     import :Internals;
     export int foo() { return 2 * (bar() + 1); }
   Translation unit #3:
     module A:Internals;
     int bar();
Translation unit #4:
     module A;
     import :Internals;
     int bar() { return baz() - 10; }
     int baz() { return 30; }
*/
// [Example 2:
/*  Translation unit #2:
  export module B;
  import :Y;
  int n = y();
Translation unit #3:
  module B:X1;
  int &a = n;
Translation unit #4:
  module B:X2;
  import B;
  int &b = n;
Translation unit #5:
  module B;
  int &c = n;
*/
```

```cpp:p247b.cpp
module A:Internals;
int bar();
module B:X1;
int &a = n;

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// Example 1
/* Translation unit #3:
     module A:Internals;
     int bar();
Translation unit #4:
     module A;
     import :Internals;
     int bar() { return baz() - 10; }
     int baz() { return 30; }
*/
// [Example 2:
/*  Translation unit #3:
  module B:X1;
  int &a = n;
Translation unit #4:
  module B:X2;
  import B;
  int &b = n;
Translation unit #5:
  module B;
  int &c = n;
*/ 
```

```cpp:p247c.cpp
module A;
import :Internals;
int bar() { return baz() - 10; }
int baz() { return 30; }
module B:X2;
import B;
int &b = n;

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// Example 1
/* Translation unit #4:
     module A;
     import :Internals;
     int bar() { return baz() - 10; }
     int baz() { return 30; }
// [Example 2:
Translation unit #4:
  module B:X2;
  import B;
  int &b = n;
Translation unit #5:
  module B;
  int &c = n;
*/ 
```

```cpp:p247d.cpp
module B;
int &c = n;

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// [Example 2:
/* Translation unit #5:
  module B;
  int &c = n;
*/
```

```ubuntu:ban
# clang++ -c p247.cpp  p247a.cpp p247b.cpp p247d.cpp -std=c++2b  -I. -Wall -fmodule-file=p247
p247.cpp:2:15: error: sorry, module partitions are not yet supported
export import :Foo;
              ^~~~
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module A
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module A
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module A follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:82:30: error: declaration of 'tm' in the global module follows declaration in module A
extern time_t mktime (struct tm *__tp) __THROW;
                             ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:90:17: error: declaration of 'tm' in the global module follows declaration in module A
                        const struct tm *__restrict __tp) __THROW;
                                     ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247a.cpp:1:16: error: sorry, module partitions are not yet supported
export module A:Foo;
               ^~~~
p247a.cpp:2:8: error: translation unit contains multiple module declarations
export module B;
       ^
p247a.cpp:1:8: note: previous module declaration is here
export module A:Foo;
       ^
p247a.cpp:3:8: error: sorry, module partitions are not yet supported
import :Y;
       ^~
p247a.cpp:4:9: error: use of undeclared identifier 'y'
int n = y();
        ^
p247a.cpp:5:8: error: sorry, module partitions are not yet supported
import :Internals;
       ^~~~~~~~~~
p247a.cpp:6:32: error: use of undeclared identifier 'bar'
export int foo() { return 2 * (bar() + 1); }
                               ^
In file included from p247a.cpp:16:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247a.cpp:16:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247a.cpp:16:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247a.cpp:16:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247a.cpp:16:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247a.cpp:16:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247b.cpp:1:9: error: sorry, module partitions are not yet supported
module A:Internals;
        ^~~~~~~~~~
p247b.cpp:1:1: error: definition of module 'A' is not available; use -fmodule-file= to specify path to precompiled module interface
module A:Internals;
^
p247b.cpp:3:9: error: sorry, module partitions are not yet supported
module B:X1;
        ^~~
p247b.cpp:3:1: error: translation unit contains multiple module declarations
module B:X1;
^
p247b.cpp:1:1: note: previous module declaration is here
module A:Internals;
^
p247b.cpp:4:10: error: use of undeclared identifier 'n'
int &a = n;
         ^
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247b.cpp:14:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module A
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247d.cpp:1:1: error: definition of module 'B' is not available; use -fmodule-file= to specify path to precompiled module interface
module B;
^
p247d.cpp:2:10: error: use of undeclared identifier 'n'
int &c = n;
         ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module B
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module B
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module B
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module B
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module B
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module B follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module B
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module B
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module B
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module B
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module B
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module B follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
In file included from p247d.cpp:12:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:82:30: error: declaration of 'tm' in the global module follows declaration in module B
extern time_t mktime (struct tm *__tp) __THROW;
                             ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```

g++

```utunbu:bash
# g++ -c p247.cpp  p247a.cpp p247b.cpp p247d.cpp -std=c++2b  -I. -Wall -fmodules-ts
In module imported at p247.cpp:2:8:
A:Foo: error: failed to read compiled module: No such file or directory
A:Foo: note: compiled module file is 'gcm.cache/A-Foo.gcm'
A:Foo: note: imports must be built before being imported
A:Foo: fatal error: returning to the gate for a mechanical issue
compilation terminated.
p247a.cpp:2:8: error: module-declaration only permitted as first declaration, or ending a global module fragment
    2 | export module B;
      |        ^~~~~~
In module imported at p247a.cpp:3:1:
A:Y: error: failed to read compiled module: No such file or directory
A:Y: note: compiled module file is 'gcm.cache/A-Y.gcm'
A:Y: note: imports must be built before being imported
A:Y: fatal error: returning to the gate for a mechanical issue
compilation terminated.
p247b.cpp:3:1: error: module-declaration only permitted as first declaration, or ending a global module fragment
    3 | module B:X1;
      | ^~~~~~
p247b.cpp:4:10: error: 'n' was not declared in this scope
    4 | int &a = n;
      |          ^
In file included from /usr/local/include/c++/12.1.0/iostream:38,
                 from p247b.cpp:14:
/usr/local/include/c++/12.1.0/x86_64-linux-gnu/bits/c++config.h: In function 'void std::__terminate()':
/usr/local/include/c++/12.1.0/x86_64-linux-gnu/bits/c++config.h:311:10: error: block-scope extern declaration 'void std::terminate()' not permitted in module purview
  311 |     void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
      |          ^~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/exception_ptr.h:40,
                 from /usr/local/include/c++/12.1.0/exception:168,
                 from /usr/local/include/c++/12.1.0/ios:39,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39:
/usr/local/include/c++/12.1.0/new: At global scope:
/usr/local/include/c++/12.1.0/new:89:27: error: cannot define 'enum class std::align_val_t' in different module
   89 |   enum class align_val_t: size_t {};
      |                           ^~~~~~
<built-in>: note: declared here
/usr/local/include/c++/12.1.0/new:89: confused by earlier errors, bailing out
In module imported at p247d.cpp:1:1:
B: error: failed to read compiled module: No such file or directory
B: note: compiled module file is 'gcm.cache/B.gcm'
B: note: imports must be built before being imported
B: fatal error: returning to the gate for a mechanical issue
compilation terminated.

```

## 検討事項(agenda)
コンパイルエラーの理由を解説する。

# third stage

```cpp:p247.cpp
export module A;
export import :Foo;
export int baz();
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "10.1 Module units and purviews [module.unit] C++N4910:2022 (130) p247.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. Ogawa Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// Example 1  
/* Translation unit #1:
     export module A;
     export import :Foo;
     export int baz();
   Translation unit #2:
     export module A:Foo;
     import :Internals;
     export int foo() { return 2 * (bar() + 1); }
Translation unit #3:
     module A:Internals;
     int bar();
Translation unit #4:
     module A;
     import :Internals;
     int bar() { return baz() - 10; }
     int baz() { return 30; }
*/
// [Example 2:
/* Translation unit #1:
  module B:Y;
  int y();
Translation unit #2:
  export module B;
  import :Y;
  int n = y();
Translation unit #3:
  module B:X1;
  int &a = n;
Translation unit #4:
  module B:X2;
  import B;
  int &b = n;
Translation unit #5:
  module B;
  int &c = n;
*/ 
// does not implicitly import B
// OK, does not create interface dependency cycle
// does not implicitly import B // error: n not visible here
// does not implicitly import B // OK
// implicitly imports B // OK
int main(){
  cout  <<  n4910 << endl;
  return EXIT_SUCCESS;
}
ro
```

```cpp:p247a.cpp
export module A:Foo;
import :Internals;
export int foo() { return 2 * (bar() + 1); }

#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;
```

```cpp:p247b.cpp
module A:Internals;
int bar();

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;
```

```cpp:p247c.cpp
module A;
import :Internals;
int bar() { return baz() - 10; }
int baz() { return 30; }

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;
```

```cpp:p247c.cpp
module B;
int &c = n;

#include <iostream>
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cassert>
#include <coroutine>
#include <vector>
#include <complex>
#include <map>
#include <atomic>
#include <unordered_map>

using namespace std;

// [Example 2:
/* Translation unit #5:
  module B;
  int &c = n;
*/
```

## 編纂・実行結果(compile and go)

```utunbu:bash
# g++ -c p247.cpp  p247a.cpp p247b.cpp p247c.cpp p247d.cpp -std=c++2b  -I. -Wall -fmodules-ts
In module imported at p247.cpp:2:8:
A:Foo: error: failed to read compiled module: No such file or directory
A:Foo: note: compiled module file is 'gcm.cache/A-Foo.gcm'
A:Foo: note: imports must be built before being imported
A:Foo: fatal error: returning to the gate for a mechanical issue
compilation terminated.
In module imported at p247a.cpp:2:1:
A:Internals: error: failed to read compiled module: No such file or directory
A:Internals: note: compiled module file is 'gcm.cache/A-Internals.gcm'
A:Internals: note: imports must be built before being imported
A:Internals: fatal error: returning to the gate for a mechanical issue
compilation terminated.
In file included from /usr/local/include/c++/12.1.0/iostream:38,
                 from p247b.cpp:4:
/usr/local/include/c++/12.1.0/x86_64-linux-gnu/bits/c++config.h: In function 'void std::__terminate()':
/usr/local/include/c++/12.1.0/x86_64-linux-gnu/bits/c++config.h:311:10: error: block-scope extern declaration 'void std::terminate()' not permitted in module purview
  311 |     void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
      |          ^~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/exception_ptr.h:40,
                 from /usr/local/include/c++/12.1.0/exception:168,
                 from /usr/local/include/c++/12.1.0/ios:39,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39:
/usr/local/include/c++/12.1.0/new: At global scope:
/usr/local/include/c++/12.1.0/new:89:27: error: cannot define 'enum class std::align_val_t' in different module
   89 |   enum class align_val_t: size_t {};
      |                           ^~~~~~
<built-in>: note: declared here
/usr/local/include/c++/12.1.0/new:89: confused by earlier errors, bailing out
In module imported at p247c.cpp:1:1:
A: error: failed to read compiled module: No such file or directory
A: note: compiled module file is 'gcm.cache/A.gcm'
A: note: imports must be built before being imported
A: fatal error: returning to the gate for a mechanical issue
compilation terminated.
In module imported at p247d.cpp:1:1:
B: error: failed to read compiled module: No such file or directory
B: note: compiled module file is 'gcm.cache/B.gcm'
B: note: imports must be built before being imported
B: fatal error: returning to the gate for a mechanical issue
compilation terminated.

# clang++ -c p247.cpp  p247a.cpp p247b.cpp p247c.cpp p247d.cpp -std=c++2b  -I. -Wall -fmodule-file=p247
p247.cpp:2:15: error: sorry, module partitions are not yet supported
export import :Foo;
              ^~~~
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module A
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module A
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module A follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:82:30: error: declaration of 'tm' in the global module follows declaration in module A
extern time_t mktime (struct tm *__tp) __THROW;
                             ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
In file included from p247.cpp:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:90:17: error: declaration of 'tm' in the global module follows declaration in module A
                        const struct tm *__restrict __tp) __THROW;
                                     ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247a.cpp:1:16: error: sorry, module partitions are not yet supported
export module A:Foo;
               ^~~~
p247a.cpp:2:8: error: sorry, module partitions are not yet supported
import :Internals;
       ^~~~~~~~~~
p247a.cpp:3:32: error: use of undeclared identifier 'bar'
export int foo() { return 2 * (bar() + 1); }
                               ^
In file included from p247a.cpp:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/vector:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247a.cpp:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/vector:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:67:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator.h:81:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:41:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247a.cpp:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/vector:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:67:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator.h:81:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247a.cpp:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/complex:45:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/sstream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/istream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247a.cpp:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/complex:45:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/sstream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/istream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247a.cpp:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/complex:45:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/sstream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/istream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247a.cpp:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/complex:45:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/sstream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/istream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
In file included from /usr/include/x86_64-linux-gnu/bits/time.h:73:
/usr/include/x86_64-linux-gnu/bits/timex.h:37:10: error: declaration of 'timeval' in module A follows declaration in the global module
  struct timeval time;          /* (read only, except for ADJ_SETOFFSET) */
         ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:8:8: note: previous declaration is here
struct timeval
       ^
In file included from p247a.cpp:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/complex:45:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/sstream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/istream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module A
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247a.cpp:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/complex:45:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/sstream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/istream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module A follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247b.cpp:1:9: error: sorry, module partitions are not yet supported
module A:Internals;
        ^~~~~~~~~~
p247b.cpp:1:1: error: definition of module 'A' is not available; use -fmodule-file= to specify path to precompiled module interface
module A:Internals;
^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module A
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module A
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module A follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
In file included from p247b.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:82:30: error: declaration of 'tm' in the global module follows declaration in module A
extern time_t mktime (struct tm *__tp) __THROW;
                             ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247c.cpp:1:1: error: definition of module 'A' is not available; use -fmodule-file= to specify path to precompiled module interface
module A;
^
p247c.cpp:2:8: error: sorry, module partitions are not yet supported
import :Internals;
       ^~~~~~~~~~
p247c.cpp:3:20: error: use of undeclared identifier 'baz'; did you mean 'bar'?
int bar() { return baz() - 10; }
                   ^~~
                   bar
p247c.cpp:3:5: note: 'bar' declared here
int bar() { return baz() - 10; }
    ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module A
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module A
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module A
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module A
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module A follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module A
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module A
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module A
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module A
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247c.cpp:6:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module A follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
p247d.cpp:1:1: error: definition of module 'B' is not available; use -fmodule-file= to specify path to precompiled module interface
module B;
^
p247d.cpp:2:10: error: use of undeclared identifier 'n'
int &c = n;
         ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/typeinfo:88:9: error: declaration of 'type_info' in the global module follows declaration in module B
  class type_info
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cxxabi_init_exception.h:52:9: note: previous declaration is here
  class type_info;
        ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:147:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception_ptr.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:126:26: error: declaration of 'operator new' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:128:26: error: declaration of 'operator new[]' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:130:6: error: declaration of 'operator delete' in the global module follows declaration in module B
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:132:6: error: declaration of 'operator delete[]' in the global module follows declaration in module B
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:149:26: error: declaration of 'operator new' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:153:6: error: declaration of 'operator delete' in the global module follows declaration in module B
void operator delete(void*, std::align_val_t)
     ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:157:26: error: declaration of 'operator new[]' in the global module follows declaration in module B
_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
                         ^
note: previous declaration is here
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:161:6: error: declaration of 'operator delete[]' in the global module follows declaration in module B
void operator delete[](void*, std::align_val_t)
     ^
note: previous declaration is here
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:52:12: error: declaration of 'iterator_traits' in module B follows declaration in the global module
    struct iterator_traits;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/cpp_type_traits.h:423:29: note: previous declaration is here
  template<typename> struct iterator_traits;
                            ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:54:56: error: declaration of 'sched_param' in the global module follows declaration in module B
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                       ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:58:50: error: declaration of 'sched_param' in the global module follows declaration in module B
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                 ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:62:24: error: declaration of 'sched_param' in the global module follows declaration in module B
                               const struct sched_param *__param) __THROW;
                                            ^
/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h:23:8: note: previous declaration is here
struct sched_param
       ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:22:
/usr/include/sched.h:77:57: error: declaration of 'timespec' in the global module follows declaration in module B
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                        ^
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:10:8: note: previous declaration is here
struct timespec
       ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:33:
/usr/include/x86_64-linux-gnu/bits/time.h:78:58: error: declaration of 'timex' in the global module follows declaration in module B
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/timex.h:26:8: note: previous declaration is here
struct timex
       ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
In file included from /usr/include/time.h:39:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: error: declaration of 'tm' in module B follows declaration in the global module
struct tm
       ^
/usr/include/wchar.h:83:8: note: previous declaration is here
struct tm;
       ^
In file included from p247d.cpp:4:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ios_base.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/atomicity.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr.h:148:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35:
In file included from /usr/include/pthread.h:23:
/usr/include/time.h:82:30: error: declaration of 'tm' in the global module follows declaration in module B
extern time_t mktime (struct tm *__tp) __THROW;
                             ^
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: previous declaration is here
struct tm
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```


# forth stage


```ubuntu:bash
# g++ -c p247a.cpp -std=c++2b  -I. -Wall -fmodules-ts
# g++ -c p247b.cpp -std=c++2b  -I. -Wall -fmodules-ts
# g++ -c p247c.cpp -std=c++2b  -I. -Wall -fmodules-ts
In module imported at p247c.cpp:1:1:
A: error: failed to read compiled module: No such file or directory
A: note: compiled module file is 'gcm.cache/A.gcm'
A: note: imports must be built before being imported
A: fatal error: returning to the gate for a mechanical issue
compilation terminated.
# g++ -c p247d.cpp -std=c++2b  -I. -Wall -fmodules-ts
In module imported at p247d.cpp:1:1:
B: error: failed to read compiled module: No such file or directory
B: note: compiled module file is 'gcm.cache/B.gcm'
B: note: imports must be built before being imported
B: fatal error: returning to the gate for a mechanical issue
compilation terminated.
# g++ -c p247.cpp -std=c++2b  -I. -Wall -fmodules-ts
In file included from /usr/local/include/c++/12.1.0/iostream:38,
                 from p247.cpp:13:
/usr/local/include/c++/12.1.0/x86_64-linux-gnu/bits/c++config.h: In function 'void std::__terminate()':
/usr/local/include/c++/12.1.0/x86_64-linux-gnu/bits/c++config.h:311:10: error: block-scope extern declaration 'void std::terminate()' not permitted in module purview
  311 |     void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
      |          ^~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/exception_ptr.h:40,
                 from /usr/local/include/c++/12.1.0/exception:168,
                 from /usr/local/include/c++/12.1.0/ios:39,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39:
/usr/local/include/c++/12.1.0/new: At global scope:
/usr/local/include/c++/12.1.0/new:89:27: error: cannot define 'enum class std::align_val_t' in different module
   89 |   enum class align_val_t: size_t {};
      |                           ^~~~~~
<built-in>: note: declared here
/usr/local/include/c++/12.1.0/new:89: confused by earlier errors, bailing out
```