public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/12139] New: SDT V3 fails with structs that are only declared
@ 2010-10-20  2:35 jistone at redhat dot com
  2010-10-21  0:02 ` [Bug translator/12139] " jistone at redhat dot com
  2011-03-01 22:53 ` jistone at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jistone at redhat dot com @ 2010-10-20  2:35 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12139

           Summary: SDT V3 fails with structs that are only declared
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sources.redhat.com
        ReportedBy: jistone@redhat.com


Using gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)

$ cat declared-struct.c
#include <sys/sdt.h>
struct foo;
int main()
{
    struct foo* p = 0;
    STAP_PROBE1(test, foo, p);
    return 0;
}

$ gcc -c declared-struct.c 
declared-struct.c: In function ‘main’:
declared-struct.c:6: error: invalid use of undefined type ‘struct foo’
declared-struct.c:6: error: invalid use of undefined type ‘struct foo’
declared-struct.c:6: error: invalid use of undefined type ‘struct foo’
declared-struct.c:6: error: invalid use of undefined type ‘struct foo’


I think it's complaining about the "+ 0" math on the argument.  If I cast "p"
to a void*, it compiles fine.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/12139] SDT V3 fails with structs that are only declared
  2010-10-20  2:35 [Bug translator/12139] New: SDT V3 fails with structs that are only declared jistone at redhat dot com
@ 2010-10-21  0:02 ` jistone at redhat dot com
  2011-03-01 22:53 ` jistone at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jistone at redhat dot com @ 2010-10-21  0:02 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12139

--- Comment #1 from Josh Stone <jistone at redhat dot com> 2010-10-21 00:02:03 UTC ---
(In reply to comment #0)
> If I cast "p" to a void*, it compiles fine.
... unless we're -pedantic, and then:

$ gcc -c declared-struct.c -pedantic
declared-struct.c: In function ‘main’:
declared-struct.c:6: warning: pointer of type ‘void *’ used in arithmetic
declared-struct.c:6: warning: pointer of type ‘void *’ used in arithmetic
declared-struct.c:6: warning: pointer of type ‘void *’ used in arithmetic
declared-struct.c:6: warning: pointer of type ‘void *’ used in arithmetic

When cast as char*, int*, etc., it works even with -pedantic.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/12139] SDT V3 fails with structs that are only declared
  2010-10-20  2:35 [Bug translator/12139] New: SDT V3 fails with structs that are only declared jistone at redhat dot com
  2010-10-21  0:02 ` [Bug translator/12139] " jistone at redhat dot com
@ 2011-03-01 22:53 ` jistone at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jistone at redhat dot com @ 2011-03-01 22:53 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=12139

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Josh Stone <jistone at redhat dot com> 2011-03-01 22:53:20 UTC ---
The sdt.h shipped with 1.4 works fine.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-01 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20  2:35 [Bug translator/12139] New: SDT V3 fails with structs that are only declared jistone at redhat dot com
2010-10-21  0:02 ` [Bug translator/12139] " jistone at redhat dot com
2011-03-01 22:53 ` jistone at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).