This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/12139] New: SDT V3 fails with structs that are only declared


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]