File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#include <stdio.h>
2+
3+ #if __STDC_VERSION__ < 202311L
24#include <stdbool.h>
5+ #endif
36
47#include "my_bool.h"
58
69bool logical_not (bool a )
710{
8- printf ("C input boolean: %d size %zu\n" , a , sizeof (a ));
11+ printf ("C boolean sizeof(%d) = %zu\n" , a , sizeof (a ));
912
1013 return !a ;
1114}
Original file line number Diff line number Diff line change 44
55bool logical_not (const bool a)
66{
7- std::cout << " C++ input boolean: " << a << " size " << sizeof (a) << " \n " ;
7+ std::cout << " C++ boolean sizeof( " << a << " ) = " << sizeof (a) << " \n " ;
88
99 return !a;
1010}
Original file line number Diff line number Diff line change 11set_property (DIRECTORY PROPERTY LABELS bool)
22
3- add_library (bool_fortran ${PROJECT_SOURCE_DIR } /src/bool/logbool.f90 )
3+ add_library (bool_fortran OBJECT ${PROJECT_SOURCE_DIR } /src/bool/logbool.f90 )
44target_include_directories (bool_fortran INTERFACE ${PROJECT_SOURCE_DIR } /src/bool )
55
6- add_library (bool_cxx ${PROJECT_SOURCE_DIR } /src/bool/logbool.cpp )
6+ add_library (bool_cxx OBJECT ${PROJECT_SOURCE_DIR } /src/bool/logbool.cpp )
77target_include_directories (bool_cxx PUBLIC ${PROJECT_SOURCE_DIR } /src/bool )
88
9- add_library (bool_c ${PROJECT_SOURCE_DIR } /src/bool/logbool.c )
9+ add_library (bool_c OBJECT ${PROJECT_SOURCE_DIR } /src/bool/logbool.c )
1010target_include_directories (bool_c PUBLIC ${PROJECT_SOURCE_DIR } /src/bool )
1111
1212add_executable (c_fortran_bool main.c )
Original file line number Diff line number Diff line change 1+ #if __STDC_VERSION__ < 202311L
12#include <stdbool.h>
3+ #endif
4+
25#include <stdio.h>
36#include <stdlib.h>
47
Original file line number Diff line number Diff line change 11
22#ifdef __cplusplus
33extern "C" {
4- #else
4+ #elif __STDC_VERSION__ < 202311L
55#include <stdbool.h>
66#endif
77
Original file line number Diff line number Diff line change 11#include <stdio.h>
2- #include <stdbool.h>
32#include <stdlib.h>
43
4+ #if __STDC_VERSION__ < 202311L
5+ #include <stdbool.h>
6+ #endif
7+
58#include "mynan.h"
69
710
Original file line number Diff line number Diff line change 1+ #if __STDC_VERSION__ < 202311L
12#include <stdbool.h>
3+ #endif
4+
25#include <string.h>
36#include <stdlib.h>
47#include <stdio.h>
Original file line number Diff line number Diff line change 1+ #if __STDC_VERSION__ < 202311L
12#include <stdbool.h>
3+ #endif
4+
25#include <string.h>
36#include <stdlib.h>
47
You can’t perform that action at this time.
0 commit comments