[Attached debug.out]
I'm sure you didn't start with a clean distribution. You have to "make realclean" before
Yes, it was that.
make realclean
perl Makefile.PL enable-debug OPTIMIZE=-g && make
gdb perl
> run -Mblib t/103_warnings.t debug all >debug.out 2>&1
> bt
[alian@poulette Convert-Binary-C-0.08]$ gdb perlGNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ppc-yellowdog-linux"...
(gdb) run -Mblib t/103_warnings.t debug all >debug.out 2>&1
Starting program: /home/alb/.soft/perl-5.8.0/bin/perl -Mblib t/103_warnings.t debug all >debug.out 2>&1
Program received signal SIGSEGV, Segmentation fault.
0xfe3f538 in strlen () at eval.c:88
88 eval.c: No such file or directory.
(gdb) bt
#0 0xfe3f538 in strlen () at eval.c:88
#1 0x10083d30 in Perl_sv_vcatpvfn ()
#2 0x10085fe4 in Perl_sv_vcatpvf ()
#3 0xfca1238 in ct_vscatf () at eval.c:88
#4 0xfcbdf34 in ucpp_error () at eval.c:88
#5 0xfce8018 in ucpp_handle_define () at eval.c:88
#6 0xfcebe4c in define_macro () at eval.c:88
#7 0xfcbf740 in ParseBuffer () at eval.c:88
#8 0xfcb1de4 in XS_Convert__Binary__C_parse () at eval.c:88
#9 0x10076160 in Perl_pp_entersub ()
#10 0x1006eb14 in Perl_runops_standard ()
#11 0x100171b8 in S_run_body ()
#12 0x10016e5c in perl_run ()
#13 0x1001417c in main ()
#14 0xfdddf70 in __libc_start_main () at eval.c:88
(gdb)
1..2238
#
#
# $p->configure; # (1) Useless use of
configure in void context
# [ $p->configure;] [1] [Useless use of configure in void context]
#
# $p->member( 'xxx', 666 ); # (E) Call to member
without parse data
# [ $p->member( 'xxx', 666 );] [E] [Call to member without parse data]
# $p->def( 'xxx' ); # (E) Call to def without
parse data
# [ $p->def( 'xxx' );] [E] [Call to def without parse data]
# $p->pack( 'xxx', {foo=>123} ); # (E) Call to pack
without parse data
# [ $p->pack( 'xxx', {foo=>123} );] [E] [Call to pack without parse data]
# $p->unpack( 'xxx', 'yyy' ); # (E) Call to unpack
without parse data
# [ $p->unpack( 'xxx', 'yyy' );] [E] [Call to unpack without parse data]
# $p->sizeof( 'xxx' ); # (E) Call to sizeof
without parse data
# [ $p->sizeof( 'xxx' );] [E] [Call to sizeof without parse data]
# $p->offsetof( 'xxx', 'yyy' ); # (E) Call to offsetof
without parse data
# [ $p->offsetof( 'xxx', 'yyy' );] [E] [Call to offsetof without parse data]
# $p->member( 'xxx', 123 ); # (E) Call to member
without parse data
# [ $p->member( 'xxx', 123 );] [E] [Call to member without parse data]
# $p->enum_names; # (E) Call to enum_names
without parse data
# [ $p->enum_names;] [E] [Call to enum_names without parse data]
# $p->enum; # (E) Call to enum
without parse data
# [ $p->enum;] [E] [Call to enum without parse data]
# $p->compound_names; # (E) Call to
compound_names without parse data
# [ $p->compound_names;] [E] [Call to compound_names without parse data]
# $p->compound; # (E) Call to compound
without parse data
# [ $p->compound;] [E] [Call to compound without parse data]
# $p->struct_names; # (E) Call to
struct_names without parse data
# [ $p->struct_names;] [E] [Call to struct_names without parse data]
# $p->struct; # (E) Call to struct
without parse data
# [ $p->struct;] [E] [Call to struct without parse data]
# $p->union_names; # (E) Call to union_names
without parse data
# [ $p->union_names;] [E] [Call to union_names without parse data]
# $p->union; # (E) Call to union
without parse data
# [ $p->union;] [E] [Call to union without parse data]
# $p->typedef_names; # (E) Call to
typedef_names without parse data
# [ $p->typedef_names;] [E] [Call to typedef_names without parse data]
# $p->typedef; # (E) Call to typedef
without parse data
# [ $p->typedef;] [E] [Call to typedef without parse data]
# $p->dependencies; # (E) Call to
dependencies without parse data
# [ $p->dependencies;] [E] [Call to dependencies without parse data]
# $p->sourcify; # (E) Call to sourcify
without parse data
# [ $p->sourcify;] [E] [Call to sourcify without parse data]
#
# $p->parse_file( 'foobar.c' ); # (E) Cannot find input
file 'foobar.c'
# [ $p->parse_file( 'foobar.c' );] [E] [Cannot find input file 'foobar.c']
#
# $p->Define(qw( DEFINE=3 DEFINE=2 ), '=');
# [ $p->Define(qw( DEFINE=3 DEFINE=2 ), '=');] [] []
# $p->parse(''); # (1) macro ... DEFINE
... redefined
# [ $p->parse('');] [1] [macro ... DEFINE ... redefined]
# # (1) void macro name
# [] [1] [void macro name]
# $p->Define([]);
# [ $p->Define([]);] [] []
#
# $p->Assert(qw{ PRED(answer) 1(foo) SYNTAX) UNFINISHED( });
# [ $p->Assert(qw{ PRED(answer) 1(foo) SYNTAX) UNFINISHED( });] [] []
# $p->parse(''); # (1) illegal assertion
name for #assert
# [ $p->parse('');] [1] [illegal assertion name for #assert]
# # (1) syntax error in
#assert
# [] [1] [syntax error in #assert]
# # (1) unfinished #assert
# [] [1] [unfinished #assert]
# $p->Assert([]);
# [ $p->Assert([]);] [] []
#
# $p->parse( $code ); # (1) macro ... FOO ...
redefined
# [ $p->parse( $code );] [1] [macro ... FOO ... redefined]
# # (2) (warning) ...
trailing garbage in #assert
# [] [2] [(warning) ... trailing garbage in #assert]
# # (1) void assertion in
#assert
# [] [1] [void assertion in #assert]
# # (1) syntax error for
assertion in #if
# [] [1] [syntax error for assertion in #if]
# # (1) file ... not_here.h
... not found
# [] [1] [file ... not_here.h ... not found]
# # (2) (warning) ...
trailing garbage in #ifdef
# [] [2] [(warning) ... trailing garbage in #ifdef]
# # (1) unmatched #endif
# [] [1] [unmatched #endif]
# # (1) rogue #else
# [] [1] [rogue #else]
# # (1) rogue #elif
# [] [1] [rogue #elif]
# # (1) unknown cpp
directive '#foobar'
# [] [1] [unknown cpp directive '#foobar']
#
# $p->def( 'xxx' ); # (1) Useless use of def
in void context
# [ $p->def( 'xxx' );] [1] [Useless use of def in void context]
# $p->dependencies; # (1) Useless use of
dependencies in void context
# [ $p->dependencies;] [1] [Useless use of dependencies in void context]
# $p->sourcify; # (1) Useless use of
sourcify in void context
# [ $p->sourcify;] [1] [Useless use of sourcify in void context]
# $p->clone; # (1) Useless use of
clone in void context
# [ $p->clone;] [1] [Useless use of clone in void context]
#
# $p->configure( Include => 'Boo' ); # (E) Include wants a
reference to an array of strings
# [ $p->configure( Include => 'Boo' );] [E] [Include wants a reference to an array of
strings]
# $p->Include( { Boo => 'Boo' } ); # (E) Include wants an
array reference
# [ $p->Include( { Boo => 'Boo' } );] [E] [Include wants an array reference]
# $p->Include( 'Boo', ['Boo'] ); # (E) Argument 2 to
Include must not be a reference
# [ $p->Include( 'Boo', ['Boo'] );] [E] [Argument 2 to Include must not be a
reference]
# $p->Include( ['Boo'], ['Boo'] ); # (E) Invalid number of
arguments to Include
# [ $p->Include( ['Boo'], ['Boo'] );] [E] [Invalid number of arguments to Include]
# $p->ByteOrder( ['Boo'] ); # (E) ByteOrder must be a
string value, not a reference
# [ $p->ByteOrder( ['Boo'] );] [E] [ByteOrder must be a string value, not a reference]
# $p->ByteOrder( 'Boo' ); # (E) ByteOrder must be
'BigEndian' or 'LittleEndian', not 'Boo'
# [ $p->ByteOrder( 'Boo' );] [E] [ByteOrder must be 'BigEndian' or 'LittleEndian',
not 'Boo']
# $p->FloatSize( [1] ); # (E) FloatSize must be
an integer value, not a reference
# [ $p->FloatSize( [1] );] [E] [FloatSize must be an integer value, not a reference]
# $p->FloatSize( 13 ); # (E) FloatSize must be
0, 1, 2, 4, 8, 12 or 16, not 13
# [ $p->FloatSize( 13 );] [E] [FloatSize must be 0, 1, 2, 4, 8, 12 or 16, not 13]
# $p->FloatSize( 1 ); # no warning
# [ $p->FloatSize( 1 );] [] [no warning]
#
# $p->pack( 'xxx', 'yyy' ); # (1) Useless use of pack
in void context
# [ $p->pack( 'xxx', 'yyy' );] [1] [Useless use of pack in void context]
# $x = $p->pack( 'na', 'yyy' ); # (E) Cannot find 'na'
# [ $x = $p->pack( 'na', 'yyy' );] [E] [Cannot find 'na']
# $x = $p->pack( 'nodef', 'yyy' ); # (E) Got no struct
declarations in resolution of 'nodef'
# [ $x = $p->pack( 'nodef', 'yyy' );] [E] [Got no struct declarations in resolution
of 'nodef']
# $x = $p->pack( 'xxx', 'yyy' ); # (E) Got no definition
for 'union xxx'
# [ $x = $p->pack( 'xxx', 'yyy' );] [E] [Got no definition for 'union xxx']
# $p->pack( 'na', 'yyy', $data ); # (E) Cannot find 'na'
# [ $p->pack( 'na', 'yyy', $data );] [E] [Cannot find 'na']
# $x = $p->pack( 'hasbf', {} ); # (1) Bitfields are
unsupported in pack('hasbf')
# [ $x = $p->pack( 'hasbf', {} );] [1] [Bitfields are unsupported in pack('hasbf')]
# $x = $p->pack( 't_unsafe', [] ); # (1) Unsafe values used
in pack('t_unsafe')
# [ $x = $p->pack( 't_unsafe', [] );] [1] [Unsafe values used in pack('t_unsafe')]
# $x = $p->pack( 's_unsafe', {} ); # (1) Unsafe values used
in pack('s_unsafe')
# [ $x = $p->pack( 's_unsafe', {} );] [1] [Unsafe values used in pack('s_unsafe')]
# $x = $p->pack( 'nonnative', 0 ); # (1) Cannot pack
non-native floating point values
# [ $x = $p->pack( 'nonnative', 0 );] [1] [Cannot pack non-native floating point
values]
# $p->pack( 'enum enu', 'A', ['xxxx'] ); # (E) Type of arg 3 to
pack must be string
# [ $p->pack( 'enum enu', 'A', ['xxxx'] );] [E] [Type of arg 3 to pack must be string]
# $p->pack( 'enum enu', 'A', 'xxxx' ); # (E) Modification of a
read-only value attempted
# [ $p->pack( 'enum enu', 'A', 'xxxx' );] [E] [Modification of a read-only value
attempted]
# $x = $p->pack( 'enum enu', 'A', 'xxxx' ); # no warning
# [ $x = $p->pack( 'enum enu', 'A', 'xxxx' );] [] [no warning]
#
# $p->unpack( 'test', $data ); # (1) Useless use of
unpack in void context
# [ $p->unpack( 'test', $data );] [1] [Useless use of unpack in void context]
# $x = $p->unpack( 'na', $data ); # (E) Cannot find 'na'
# [ $x = $p->unpack( 'na', $data );] [E] [Cannot find 'na']
# $x = $p->unpack( 'nodef', $data ); # (E) Got no struct
declarations in resolution of 'nodef'
# [ $x = $p->unpack( 'nodef', $data );] [E] [Got no struct declarations in resolution
of 'nodef']
# $x = $p->unpack( 'xxx', $data ); # (E) Got no definition
for 'union xxx'
# [ $x = $p->unpack( 'xxx', $data );] [E] [Got no definition for 'union xxx']
# $x = $p->unpack( 'test', $data ); # (1) Data too short
# [ $x = $p->unpack( 'test', $data );] [1] [Data too short]
# $x = $p->unpack( 'hasbf', $data ); # (1) Bitfields are
unsupported in unpack('hasbf')
# [ $x = $p->unpack( 'hasbf', $data );] [1] [Bitfields are unsupported in
unpack('hasbf')]
# $x = $p->unpack( 't_unsafe', $data ); # (1) Unsafe values used
in unpack('t_unsafe')
# [ $x = $p->unpack( 't_unsafe', $data );] [1] [Unsafe values used in
unpack('t_unsafe')]
# # (1) Data too short
# [] [1] [Data too short]
# $x = $p->unpack( 's_unsafe', $data ); # (1) Unsafe values used
in unpack('s_unsafe')
# [ $x = $p->unpack( 's_unsafe', $data );] [1] [Unsafe values used in
unpack('s_unsafe')]
# # (1) Data too short
# [] [1] [Data too short]
# $x = $p->unpack( 'nonnative', 'x' ); # (1) Cannot unpack
non-native floating point values
# [ $x = $p->unpack( 'nonnative', 'x' );] [1] [Cannot unpack non-native floating
point values]
#
# $x = $p->unpack( 'multiple', 'x'x100 ); # (1) Member 'a' used
more than once in struct multiple defined in [buffer](71)
# [ $x = $p->unpack( 'multiple', 'x'x100 );] [1] [Member 'a' used more than once in
struct multiple defined in [buffer](71)]
# # (1) Member 'b' used
more than once in union defined in [buffer](75)
# [] [1] [Member 'b' used more than once in union defined in [buffer](75)]
#
# $p->sizeof( 'na' ); # (1) Useless use of
sizeof in void context
# [ $p->sizeof( 'na' );] [1] [Useless use of sizeof in void context]
# $x = $p->sizeof( 'na' ); # (E) Cannot find 'na'
# [ $x = $p->sizeof( 'na' );] [E] [Cannot find 'na']
# $x = $p->sizeof( 'nodef' ); # (E) Got no struct
declarations in resolution of 'nodef'
# [ $x = $p->sizeof( 'nodef' );] [E] [Got no struct declarations in resolution of
'nodef']
# $x = $p->sizeof( 'xxx' ); # (E) Got no definition
for 'union xxx'
# [ $x = $p->sizeof( 'xxx' );] [E] [Got no definition for 'union xxx']
# $x = $p->sizeof( 'hasbf' ); # (1) Bitfields are
unsupported in sizeof('hasbf')
# [ $x = $p->sizeof( 'hasbf' );] [1] [Bitfields are unsupported in sizeof('hasbf')]
# $x = $p->sizeof( 't_unsafe' ); # (1) Unsafe values used
in sizeof('t_unsafe')
# [ $x = $p->sizeof( 't_unsafe' );] [1] [Unsafe values used in sizeof('t_unsafe')]
# $x = $p->sizeof( 's_unsafe' ); # (1) Unsafe values used
in sizeof('s_unsafe')
# [ $x = $p->sizeof( 's_unsafe' );] [1] [Unsafe values used in sizeof('s_unsafe')]
# $x = $p->sizeof( 'enum enu . foo' ); # (E) An enum does not
have members
# [ $x = $p->sizeof( 'enum enu . foo' );] [E] [An enum does not have members]
# $x = $p->sizeof( 'enumtype.foo' ); # (E) An enum does not
have members
# [ $x = $p->sizeof( 'enumtype.foo' );] [E] [An enum does not have members]
# $x = $p->sizeof( 'ptrtype.foo' ); # (E) A pointer type does
not have members
# [ $x = $p->sizeof( 'ptrtype.foo' );] [E] [A pointer type does not have members]
# $x = $p->sizeof( 'basic.foo' ); # (E) A basic type does
not have members
# [ $x = $p->sizeof( 'basic.foo' );] [E] [A basic type does not have members]
# $x = $p->sizeof( 'enumtype [0]' ); # (E) Invalid character
'[' (0x5B) in struct member expression
# [ $x = $p->sizeof( 'enumtype [0]' );] [E] [Invalid character '[' (0x5B) in struct
member expression]
# $x = $p->sizeof( 'test.666' ); # (E) Struct members must
start with a character or an underscore
# [ $x = $p->sizeof( 'test.666' );] [E] [Struct members must start with a character
or an underscore]
# $x = $p->sizeof( 'test.foo.d' ); # (E) Cannot access
member '.d' of array type
# [ $x = $p->sizeof( 'test.foo.d' );] [E] [Cannot access member '.d' of array type]
# $x = $p->sizeof( 'test.bar.d' ); # (E) Cannot access
member '.d' of non-compound type
# [ $x = $p->sizeof( 'test.bar.d' );] [E] [Cannot access member '.d' of non-compound
type]
# $x = $p->sizeof( 'test.yyy.d' ); # (E) Cannot access
member '.d' of pointer type
# [ $x = $p->sizeof( 'test.yyy.d' );] [E] [Cannot access member '.d' of pointer type]
# $x = $p->sizeof( 'test.ptr.d' ); # (E) Cannot access
member '.d' of pointer type
# [ $x = $p->sizeof( 'test.ptr.d' );] [E] [Cannot access member '.d' of pointer type]
# $x = $p->sizeof( 'test.xxx[1]' ); # (E) Cannot use 'xxx' as
an array
# [ $x = $p->sizeof( 'test.xxx[1]' );] [E] [Cannot use 'xxx' as an array]
# $x = $p->sizeof( 'test.bar[1]' ); # (E) Cannot use 'bar' as
an array
# [ $x = $p->sizeof( 'test.bar[1]' );] [E] [Cannot use 'bar' as an array]
# $x = $p->sizeof( 'test.bar()' ); # (E) Invalid character
'(' (0x28) in struct member expression
# [ $x = $p->sizeof( 'test.bar()' );] [E] [Invalid character '(' (0x28) in struct
member expression]
# $x = $p->sizeof( 'test.foo[1][2' ); # (E) Incomplete struct
member expression
# [ $x = $p->sizeof( 'test.foo[1][2' );] [E] [Incomplete struct member expression]
# $x = $p->sizeof( 'test.foo[1][2].d' ); # (E) Cannot find struct
member 'd'
# [ $x = $p->sizeof( 'test.foo[1][2].d' );] [E] [Cannot find struct member 'd']
# $x = $p->sizeof( 'test.foo[a]' ); # (E) Array indices must
be constant decimal values
# [ $x = $p->sizeof( 'test.foo[a]' );] [E] [Array indices must be constant decimal
values]
# $x = $p->sizeof( 'test.foo[0x1]' ); # (E) Index operator not
terminated correctly
# [ $x = $p->sizeof( 'test.foo[0x1]' );] [E] [Index operator not terminated correctly]
# $x = $p->sizeof( 'test.foo[2]' ); # (E) Cannot use index 2
into array of size 2
# [ $x = $p->sizeof( 'test.foo[2]' );] [E] [Cannot use index 2 into array of size 2]
# $x = $p->sizeof( 'test.foo[1][2][0]' ); # (E) Cannot use 'foo' as
a 3-dimensional array
# [ $x = $p->sizeof( 'test.foo[1][2][0]' );] [E] [Cannot use 'foo' as a 3-dimensional
array]
#
# $p->offsetof( 'xxx', 666 ); # (1) Useless use of
offsetof in void context
# [ $p->offsetof( 'xxx', 666 );] [1] [Useless use of offsetof in void context]
# $x = $p->offsetof( 'abc', 666 ); # (E) Cannot find 'abc'
# [ $x = $p->offsetof( 'abc', 666 );] [E] [Cannot find 'abc']
# $x = $p->offsetof( 'nodef', 666 ); # (E) Got no struct
declarations in resolution of 'nodef'
# [ $x = $p->offsetof( 'nodef', 666 );] [E] [Got no struct declarations in resolution
of 'nodef']
# $x = $p->offsetof( 'xxx', 666 ); # (E) Got no definition
for 'union xxx'
# [ $x = $p->offsetof( 'xxx', 666 );] [E] [Got no definition for 'union xxx']
# $x = $p->offsetof( 'ptrtype', 666 ); # (E) Cannot use offsetof
on a pointer type
# [ $x = $p->offsetof( 'ptrtype', 666 );] [E] [Cannot use offsetof on a pointer type]
# $x = $p->offsetof( 'basic', '666' ); # (E) Cannot use offsetof
on a basic type
# [ $x = $p->offsetof( 'basic', '666' );] [E] [Cannot use offsetof on a basic type]
# $x = $p->offsetof( 'enu', '666' ); # (E) Cannot use offsetof
on an enum
# [ $x = $p->offsetof( 'enu', '666' );] [E] [Cannot use offsetof on an enum]
# $x = $p->offsetof( 'test', '666' ); # (E) Struct members must
start with a character or an underscore
# [ $x = $p->offsetof( 'test', '666' );] [E] [Struct members must start with a
character or an underscore]
# $x = $p->offsetof( 'test', 'foo.d' ); # (E) Cannot access
member '.d' of array type
# [ $x = $p->offsetof( 'test', 'foo.d' );] [E] [Cannot access member '.d' of array
type]
# $x = $p->offsetof( 'test', 'bar.d' ); # (E) Cannot access
member '.d' of non-compound type
# [ $x = $p->offsetof( 'test', 'bar.d' );] [E] [Cannot access member '.d' of
non-compound type]
# $x = $p->offsetof( 'test', 'yyy.d' ); # (E) Cannot access
member '.d' of pointer type
# [ $x = $p->offsetof( 'test', 'yyy.d' );] [E] [Cannot access member '.d' of pointer
type]
# $x = $p->offsetof( 'test', 'ptr.d' ); # (E) Cannot access
member '.d' of pointer type
# [ $x = $p->offsetof( 'test', 'ptr.d' );] [E] [Cannot access member '.d' of pointer
type]
# $x = $p->offsetof( 'test', 'xxx[1]' ); # (E) Cannot use 'xxx' as
an array
# [ $x = $p->offsetof( 'test', 'xxx[1]' );] [E] [Cannot use 'xxx' as an array]
# $x = $p->offsetof( 'test', 'bar[1]' ); # (E) Cannot use 'bar' as
an array
# [ $x = $p->offsetof( 'test', 'bar[1]' );] [E] [Cannot use 'bar' as an array]
# $x = $p->offsetof( 'test', 'bar()' ); # (E) Invalid character
'(' (0x28) in struct member expression
# [ $x = $p->offsetof( 'test', 'bar()' );] [E] [Invalid character '(' (0x28) in
struct member expression]
# $x = $p->offsetof( 'test', 'foo[1][2' ); # (E) Incomplete struct
member expression
# [ $x = $p->offsetof( 'test', 'foo[1][2' );] [E] [Incomplete struct member
expression]
# $x = $p->offsetof( 'test', 'foo[1][2].d' ); # (E) Cannot find struct
member 'd'
# [ $x = $p->offsetof( 'test', 'foo[1][2].d' );] [E] [Cannot find struct member 'd']
# $x = $p->offsetof( 'test', 'foo[a]' ); # (E) Array indices must
be constant decimal values
# [ $x = $p->offsetof( 'test', 'foo[a]' );] [E] [Array indices must be constant
decimal values]
# $x = $p->offsetof( 'test', 'foo[0x1]' ); # (E) Index operator not
terminated correctly
# [ $x = $p->offsetof( 'test', 'foo[0x1]' );] [E] [Index operator not terminated
correctly]
# $x = $p->offsetof( 'test', 'foo[2]' ); # (E) Cannot use index 2
into array of size 2
# [ $x = $p->offsetof( 'test', 'foo[2]' );] [E] [Cannot use index 2 into array of
size 2]
# $x = $p->offsetof( 'test', 'foo[1][2][0]' ); # (E) Cannot use 'foo' as
a 3-dimensional array
# [ $x = $p->offsetof( 'test', 'foo[1][2][0]' );] [E] [Cannot use 'foo' as a
3-dimensional array]
# $x = $p->offsetof( 'hasbf', 'nobf' ); # (1) Bitfields are
unsupported in offsetof('hasbf')
# [ $x = $p->offsetof( 'hasbf', 'nobf' );] [1] [Bitfields are unsupported in
offsetof('hasbf')]
# $x = $p->offsetof( 's_unsafe', 'foo' ); # (1) Unsafe values used
in offsetof('s_unsafe')
# [ $x = $p->offsetof( 's_unsafe', 'foo' );] [1] [Unsafe values used in
offsetof('s_unsafe')]
#
# $x = $p->offsetof( 'test.arx[3][4]', 'uni[3].str.c' ); # (E) Cannot find struct
member 'arx'
# [ $x = $p->offsetof( 'test.arx[3][4]', 'uni[3].str.c' );] [E] [Cannot find struct
member 'arx']
# $x = $p->offsetof( 'test.ary[3][4]', 'uni[3].str.c' ); # (E) Cannot use index 3
into array of size 3
# [ $x = $p->offsetof( 'test.ary[3][4]', 'uni[3].str.c' );] [E] [Cannot use index 3
into array of size 3]
# $x = $p->offsetof( 'test.ary[2][4]', 'uni[3].str.c' ); # (E) Cannot use index 4
into array of size 4
# [ $x = $p->offsetof( 'test.ary[2][4]', 'uni[3].str.c' );] [E] [Cannot use index 4
into array of size 4]
# $x = $p->offsetof( 'test.ary[2][3]', 'uni[6].str.c' ); # (E) Cannot use index 6
into array of size 5
# [ $x = $p->offsetof( 'test.ary[2][3]', 'uni[6].str.c' );] [E] [Cannot use index 6
into array of size 5]
# $x = $p->offsetof( 'test.ary[2][3]', 'uni[1].str.c' ); # (E) Cannot find struct
member 'c'
# [ $x = $p->offsetof( 'test.ary[2][3]', 'uni[1].str.c' );] [E] [Cannot find struct
member 'c']
# $x = $p->offsetof( 'test.ary[2][3].uni.a', 'xxx' ); # (E) Cannot access
member '.a' of array type
# [ $x = $p->offsetof( 'test.ary[2][3].uni.a', 'xxx' );] [E] [Cannot access member
'.a' of array type]
# $x = $p->offsetof( 'test.ary[2][3].uni', 'xxx' ); # (E) Cannot use offsetof
on an array type
# [ $x = $p->offsetof( 'test.ary[2][3].uni', 'xxx' );] [E] [Cannot use offsetof on an
array type]
# $x = $p->offsetof( 'test.ary[2][3]', 'uni.xxx' ); # (E) Cannot access
member '.xxx' of array type
# [ $x = $p->offsetof( 'test.ary[2][3]', 'uni.xxx' );] [E] [Cannot access member
'.xxx' of array type]
# $x = $p->offsetof( 'test.ary[2][3].uni[0].a', 'xxx' ); # (E) Cannot use offsetof
on an enum
# [ $x = $p->offsetof( 'test.ary[2][3].uni[0].a', 'xxx' );] [E] [Cannot use offsetof
on an enum]
# $x = $p->offsetof( 'test.ary[2][3].uni[0].str.a', 'b' ); # (E) Cannot use offsetof
on a pointer type
# [ $x = $p->offsetof( 'test.ary[2][3].uni[0].str.a', 'b' );] [E] [Cannot use
offsetof on a pointer type]
#
# $p->member( 'xxx', 6666 ); # (1) Useless use of
member in void context
# [ $p->member( 'xxx', 6666 );] [1] [Useless use of member in void context]
# $x = $p->member( 'abc', 6666 ); # (E) Cannot find 'abc'
# [ $x = $p->member( 'abc', 6666 );] [E] [Cannot find 'abc']
# $x = $p->member( 'nodef', 6666 ); # (E) Got no struct
declarations in resolution of 'nodef'
# [ $x = $p->member( 'nodef', 6666 );] [E] [Got no struct declarations in resolution
of 'nodef']
# $x = $p->member( 'xxx', 6666 ); # (E) Got no definition
for 'union xxx'
# [ $x = $p->member( 'xxx', 6666 );] [E] [Got no definition for 'union xxx']
# $x = $p->member( 'ptrtype', 6666 ); # (E) Cannot use member
on a pointer type
# [ $x = $p->member( 'ptrtype', 6666 );] [E] [Cannot use member on a pointer type]
# $x = $p->member( 'basic', 6666 ); # (E) Cannot use member
on a basic type
# [ $x = $p->member( 'basic', 6666 );] [E] [Cannot use member on a basic type]
# $x = $p->member( 'enu', 6666 ); # (E) Cannot use member
on an enum
# [ $x = $p->member( 'enu', 6666 );] [E] [Cannot use member on an enum]
# $x = $p->member( 'test', 6666 ); # (E) Offset 6666 out of
range
# [ $x = $p->member( 'test', 6666 );] [E] [Offset 6666 out of range]
# $x = $p->member( 'hasbf', 1 ); # (1) Bitfields are
unsupported in member('hasbf')
# [ $x = $p->member( 'hasbf', 1 );] [1] [Bitfields are unsupported in member('hasbf')]
# $x = $p->member( 's_unsafe', 1 ); # (1) Unsafe values used
in member('s_unsafe')
# [ $x = $p->member( 's_unsafe', 1 );] [1] [Unsafe values used in member('s_unsafe')]
#
# $x = $p->member( 'test.arx[3][4]', 6666 ); # (E) Cannot find struct
member 'arx'
# [ $x = $p->member( 'test.arx[3][4]', 6666 );] [E] [Cannot find struct member 'arx']
# $x = $p->member( 'test.ary[3][4]', 6666 ); # (E) Cannot use index 3
into array of size 3
# [ $x = $p->member( 'test.ary[3][4]', 6666 );] [E] [Cannot use index 3 into array of
size 3]
# $x = $p->member( 'test.ary[2][4]', 6666 ); # (E) Cannot use index 4
into array of size 4
# [ $x = $p->member( 'test.ary[2][4]', 6666 );] [E] [Cannot use index 4 into array of
size 4]
# $x = $p->member( 'test.ary[2][3]', 6666 ); # (E) Offset 6666 out of
range
# [ $x = $p->member( 'test.ary[2][3]', 6666 );] [E] [Offset 6666 out of range]
# $x = $p->member( 'test.ary[2][3].uni.a', 6666 ); # (E) Cannot access
member '.a' of array type
# [ $x = $p->member( 'test.ary[2][3].uni.a', 6666 );] [E] [Cannot access member '.a'
of array type]
# $x = $p->member( 'test.ary[2][3].uni', 6666 ); # (E) Cannot use member
on an array type
# [ $x = $p->member( 'test.ary[2][3].uni', 6666 );] [E] [Cannot use member on an
array type]
# $x = $p->member( 'test.ary[2][3].uni[0].a', 6666 ); # (E) Cannot use member
on an enum
# [ $x = $p->member( 'test.ary[2][3].uni[0].a', 6666 );] [E] [Cannot use member on an
enum]
# $x = $p->member( 'test.ary[2][3].uni[0].str.a', 6666 ); # (E) Cannot use member
on a pointer type
# [ $x = $p->member( 'test.ary[2][3].uni[0].str.a', 6666 );] [E] [Cannot use member
on a pointer type]
#
# $p->enum_names; # (1) Useless use of
enum_names in void context
# [ $p->enum_names;] [1] [Useless use of enum_names in void context]
# $p->enum; # (1) Useless use of enum
in void context
# [ $p->enum;] [1] [Useless use of enum in void context]
# $x = $p->enum( 'na' ); # (1) Cannot find enum
'na'
# [ $x = $p->enum( 'na' );] [1] [Cannot find enum 'na']
#
# $p->compound_names; # (1) Useless use of
compound_names in void context
# [ $p->compound_names;] [1] [Useless use of compound_names in void context]
# $p->compound; # (1) Useless use of
compound in void context
# [ $p->compound;] [1] [Useless use of compound in void context]
# $x = $p->compound( 'na' ); # (1) Cannot find
compound 'na'
# [ $x = $p->compound( 'na' );] [1] [Cannot find compound 'na']
#
# $p->struct_names; # (1) Useless use of
struct_names in void context
# [ $p->struct_names;] [1] [Useless use of struct_names in void context]
# $p->struct; # (1) Useless use of
struct in void context
# [ $p->struct;] [1] [Useless use of struct in void context]
# $x = $p->struct( 'na' ); # (1) Cannot find struct
'na'
# [ $x = $p->struct( 'na' );] [1] [Cannot find struct 'na']
#
# $p->union_names; # (1) Useless use of
union_names in void context
# [ $p->union_names;] [1] [Useless use of union_names in void context]
# $p->union; # (1) Useless use of
union in void context
# [ $p->union;] [1] [Useless use of union in void context]
# $x = $p->union( 'na' ); # (1) Cannot find union
'na'
# [ $x = $p->union( 'na' );] [1] [Cannot find union 'na']
#
# $p->typedef_names; # (1) Useless use of
typedef_names in void context
# [ $p->typedef_names;] [1] [Useless use of typedef_names in void context]
# $p->typedef; # (1) Useless use of
typedef in void context
# [ $p->typedef;] [1] [Useless use of typedef in void context]
# $x = $p->typedef( 'na' ); # (1) Cannot find typedef
'na'
# [ $x = $p->typedef( 'na' );] [1] [Cannot find typedef 'na']
#
# $x = $p->pack( 'e_unsafe', 'SAFE' ); # no warning
# [ $x = $p->pack( 'e_unsafe', 'SAFE' );] [] [no warning]
# $x = $p->pack( 'e_unsafe', 'GOOD' ); # no warning
# [ $x = $p->pack( 'e_unsafe', 'GOOD' );] [] [no warning]
# $x = $p->pack( 'e_unsafe', 'UNSAFE' ); # (1) Enumerator value
'UNSAFE' is unsafe
# [ $x = $p->pack( 'e_unsafe', 'UNSAFE' );] [1] [Enumerator value 'UNSAFE' is unsafe]
# $x = $p->pack( 'e_unsafe', 'BAD' ); # (1) Enumerator value
'BAD' is unsafe
# [ $x = $p->pack( 'e_unsafe', 'BAD' );] [1] [Enumerator value 'BAD' is unsafe]
#
# $p->EnumType( 'Integer' );
# [ $p->EnumType( 'Integer' );] [] []
# $x = $p->unpack( 'e_unsafe', $data ); # no warning
# [ $x = $p->unpack( 'e_unsafe', $data );] [] [no warning]
# $p->EnumType( 'String' );
# [ $p->EnumType( 'String' );] [] []
# $x = $p->unpack( 'e_unsafe', $data ); # (1) Enumeration
'e_unsafe' contains unsafe values
# [ $x = $p->unpack( 'e_unsafe', $data );] [1] [Enumeration 'e_unsafe' contains
unsafe values]
# $p->EnumType( 'Both' );
# [ $p->EnumType( 'Both' );] [] []
# $x = $p->unpack( 'e_unsafe', $data ); # (1) Enumeration
'e_unsafe' contains unsafe values
# [ $x = $p->unpack( 'e_unsafe', $data );] [1] [Enumeration 'e_unsafe' contains
unsafe values]
DBG: $=Convert::Binary::C::new
ctlib/util/list.c(231):A=20@101F3BE8
ctlib/util/list.c(231):A=20@101F3C00
ctlib/util/list.c(231):A=20@10124430
ctlib/util/list.c(231):A=20@10124448
HT_new( 1 )
ctlib/util/hash.c(195):A=32@102418A8
ctlib/util/hash.c(197):A=8@1012A408
created new hash table @ 0x102418A8 with 2 buckets
DBG: ctparse::InitParseInfo()
ok 1
# evaluating code: $p->configure;
DBG: 0=Convert::Binary::C::configure
ok 2
# got no warnings
ok 3
# evaluating code: $p->member( 'xxx', 666 );
DBG: 0=Convert::Binary::C::member( 'xxx', 666 )
# error:
# Call to member without parse data at (eval 2) line 1, <DATA> line 1.
ok 4
# got no warnings
ok 5
# evaluating code: $p->def( 'xxx' );
DBG: 0=Convert::Binary::C::def( 'xxx' )
# error:
# Call to def without parse data at (eval 3) line 1, <DATA> line 1.
ok 6
# got no warnings
ok 7
# evaluating code: $p->pack( 'xxx', {foo=>123} );
DBG: 0=Convert::Binary::C::pack( 'xxx' )
# error:
# Call to pack without parse data at (eval 4) line 1, <DATA> line 1.
ok 8
# got no warnings
ok 9
# evaluating code: $p->unpack( 'xxx', 'yyy' );
DBG: 0=Convert::Binary::C::unpack( 'xxx' )
# error:
# Call to unpack without parse data at (eval 5) line 1, <DATA> line 1.
ok 10
# got no warnings
ok 11
# evaluating code: $p->sizeof( 'xxx' );
DBG: 0=Convert::Binary::C::sizeof( 'xxx' )
# error:
# Call to sizeof without parse data at (eval 6) line 1, <DATA> line 1.
ok 12
# got no warnings
ok 13
# evaluating code: $p->offsetof( 'xxx', 'yyy' );
DBG: 0=Convert::Binary::C::offsetof( 'xxx', 'yyy' )
# error:
# Call to offsetof without parse data at (eval 7) line 1, <DATA> line 1.
ok 14
# got no warnings
ok 15
# evaluating code: $p->member( 'xxx', 123 );
DBG: 0=Convert::Binary::C::member( 'xxx', 123 )
# error:
# Call to member without parse data at (eval 8) line 1, <DATA> line 1.
ok 16
# got no warnings
ok 17
# evaluating code: $p->enum_names;
DBG: 0=Convert::Binary::C::enum_names
# error:
# Call to enum_names without parse data at (eval 9) line 1, <DATA> line 1.
ok 18
# got no warnings
ok 19
# evaluating code: $p->enum;
DBG: 0=Convert::Binary::C::enum
# error:
# Call to enum without parse data at (eval 10) line 1, <DATA> line 1.
ok 20
# got no warnings
ok 21
# evaluating code: $p->compound_names;
DBG: 0=Convert::Binary::C::compound_names
# error:
# Call to compound_names without parse data at (eval 11) line 1, <DATA> line 1.
ok 22
# got no warnings
ok 23
# evaluating code: $p->compound;
DBG: 0=Convert::Binary::C::compound
# error:
# Call to compound without parse data at (eval 12) line 1, <DATA> line 1.
ok 24
# got no warnings
ok 25
# evaluating code: $p->struct_names;
DBG: 0=Convert::Binary::C::struct_names
# error:
# Call to struct_names without parse data at (eval 13) line 1, <DATA> line 1.
ok 26
# got no warnings
ok 27
# evaluating code: $p->struct;
DBG: 0=Convert::Binary::C::struct
# error:
# Call to struct without parse data at (eval 14) line 1, <DATA> line 1.
ok 28
# got no warnings
ok 29
# evaluating code: $p->union_names;
DBG: 0=Convert::Binary::C::union_names
# error:
# Call to union_names without parse data at (eval 15) line 1, <DATA> line 1.
ok 30
# got no warnings
ok 31
# evaluating code: $p->union;
DBG: 0=Convert::Binary::C::union
# error:
# Call to union without parse data at (eval 16) line 1, <DATA> line 1.
ok 32
# got no warnings
ok 33
# evaluating code: $p->typedef_names;
DBG: 0=Convert::Binary::C::typedef_names
# error:
# Call to typedef_names without parse data at (eval 17) line 1, <DATA> line 1.
ok 34
# got no warnings
ok 35
# evaluating code: $p->typedef;
DBG: 0=Convert::Binary::C::typedef
# error:
# Call to typedef without parse data at (eval 18) line 1, <DATA> line 1.
ok 36
# got no warnings
ok 37
# evaluating code: $p->dependencies;
DBG: 0=Convert::Binary::C::dependencies
# error:
# Call to dependencies without parse data at (eval 19) line 1, <DATA> line 1.
ok 38
# got no warnings
ok 39
# evaluating code: $p->sourcify;
DBG: 0=Convert::Binary::C::sourcify
# error:
# Call to sourcify without parse data at (eval 20) line 1, <DATA> line 1.
ok 40
# got no warnings
ok 41
# evaluating code: $p->parse_file( 'foobar.c' );
DBG: 0=Convert::Binary::C::parse_file
DBG: ctparse::ParseBuffer( foobar.c, 0x00000000, 0x1011E590, 0x1011E54C )
DBG: Trying 'foobar.c'...
ctlib/util/list.c(727):V=101F3BE8
ctlib/util/list.c(751):V=101F3BE8
ctlib/ctparse.c(1033):A=34@101844F0
# error:
# Cannot find input file 'foobar.c' at (eval 21) line 1, <DATA> line 1.
ok 42
# got no warnings
ok 43
# evaluating code: $p->Define(qw( DEFINE=3 DEFINE=2 ), '=');
DBG: 0=Convert::Binary::C::Define
ctlib/util/list.c(397):V=101F3C00
ctlib/util/list.c(144):A=12@102114F0
ctlib/util/list.c(397):V=101F3C00
ctlib/util/list.c(144):A=12@1021E930
ctlib/util/list.c(397):V=101F3C00
ctlib/util/list.c(144):A=12@1020BCE8
ok 44
# got no warnings
ok 45
# evaluating code: $p->parse('');
DBG: 0=Convert::Binary::C::parse
DBG: ctparse::ParseBuffer( [buffer], 0x7FFFF6D8, 0x1011E590, 0x1011E54C )
DBG: creating linked lists
ctlib/util/list.c(231):A=20@1021B548
ctlib/util/list.c(231):A=20@1020D170
ctlib/util/list.c(231):A=20@1023FB30
HT_new( 5 )
ctlib/util/hash.c(195):A=32@1020D598
ctlib/util/hash.c(197):A=128@102410A8
created new hash table @ 0x1020D598 with 32 buckets
HT_new( 4 )
ctlib/util/hash.c(195):A=32@1020D5C0
ctlib/util/hash.c(197):A=64@10241130
created new hash table @ 0x1020D5C0 with 16 buckets
HT_new( 4 )
ctlib/util/hash.c(195):A=32@10213200
ctlib/util/hash.c(197):A=64@10213228
created new hash table @ 0x10213200 with 16 buckets
HT_new( 4 )
ctlib/util/hash.c(195):A=32@10212C70
ctlib/util/hash.c(197):A=64@10212C98
created new hash table @ 0x10212C70 with 16 buckets
HT_new( 3 )
ctlib/util/hash.c(195):A=32@1020E078
ctlib/util/hash.c(197):A=32@1020E0A0
created new hash table @ 0x1020E078 with 8 buckets
DBG: initializing preprocessor
DBG: configuring preprocessor
ctlib/util/list.c(727):V=101F3BE8
ctlib/util/list.c(751):V=101F3BE8
ctlib/util/list.c(727):V=101F3C00
ctlib/util/list.c(751):V=101F3C00
DBG: defining macro 'DEFINE=3'
ctlib/util/list.c(751):V=101F3C00
DBG: defining macro 'DEFINE=2'
