Skip to content

typedef struct compile error in mpide-20140316  #630

@JacobChrist

Description

@JacobChrist

I found an issue with typedef struct in mpide-20140316. I have a workaround and I don't think this needs to be fixed but I wanted to document the issue and workaround in the event someone else comes across the same problem.

This problem does not appear to be an issue in the latest chipkit-core.

In the following code foo() compiles but bar() does not. The foo() is a workaround for the bar().

typedef struct {
  double p;
} p_struct;

void foo(void* h){
  ((p_struct *)h)->p = 666;
}

void bar(p_struct* h){
  h->p = 666;
}

void setup() {
  // put your setup code here, to run once:
}
void loop() {
  // put your main code here, to run repeatedly: 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions