File tree 3 files changed +37
-3
lines changed
regression/goto-instrument/typedef4 3 files changed +37
-3
lines changed Original file line number Diff line number Diff line change
1
+ #ifndef _WIN32
2
+
3
+ #include <signal.h>
4
+ #include <stdlib.h>
5
+
6
+ void sig_block (int sig )
7
+ {
8
+ sigset_t ss ;
9
+ sigemptyset (& ss );
10
+ sigaddset (& ss , sig );
11
+ sigprocmask (SIG_BLOCK , & ss , NULL );
12
+ }
13
+
14
+ int main () {
15
+ sig_block (0 );
16
+ return 0 ;
17
+ }
18
+ #else
19
+ int main ()
20
+ {
21
+ return 0 ;
22
+ }
23
+ #endif
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --dump-c --use-system-headers
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ --
7
+ ^warning: ignoring
8
+ --
9
+ This test should be run via chain.sh, which will try to recompile the dumped C
10
+ code. Missing/incomplete typedef output would cause a failure.
Original file line number Diff line number Diff line change @@ -144,8 +144,9 @@ void dump_ct::operator()(std::ostream &os)
144
144
symbol.type .set (ID_tag, new_tag);
145
145
}
146
146
147
- // we don't want to dump in full all definitions
148
- if (!tag_added && ignore (symbol))
147
+ // we don't want to dump in full all definitions; in particular
148
+ // do not dump anonymous types that are defined in system headers
149
+ if ((!tag_added || symbol.is_type ) && ignore (symbol))
149
150
continue ;
150
151
151
152
if (!symbols_sorted.insert (name_str).second )
@@ -1025,7 +1026,7 @@ void dump_ct::gather_global_typedefs()
1025
1026
{
1026
1027
const symbolt &symbol=symbol_entry.second ;
1027
1028
1028
- if (symbol.is_macro && symbol.is_type && ! ignore (symbol) &&
1029
+ if (symbol.is_macro && symbol.is_type &&
1029
1030
symbol.location .get_function ().empty ())
1030
1031
{
1031
1032
const irep_idt &typedef_str=symbol.type .get (ID_C_typedef);
You can’t perform that action at this time.
0 commit comments