Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typedef struct compile error in mpide-20140316 #630

Open
JacobChrist opened this issue Dec 23, 2015 · 0 comments
Open

typedef struct compile error in mpide-20140316 #630

JacobChrist opened this issue Dec 23, 2015 · 0 comments

Comments

@JacobChrist
Copy link
Member

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: 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant