Skip to content

Commit

Permalink
Update ccalltest.c
Browse files Browse the repository at this point in the history
Asked for by @psanan in #10471

Seems pretty obvious and safe to me.
  • Loading branch information
ivarne committed Mar 24, 2015
1 parent c4b5397 commit 03da3a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/ccalltest.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ complex_t ctest(complex_t a) {
complex double cgtest(complex double a) {
//Unpack a ComplexPair{Float64} struct
if (verbose) fprintf(stderr,"%g + %g i\n", creal(a), cimag(a));
a += 1 - 2i;
a += 1 - (2.0*i);
return a;
}

Expand Down

4 comments on commit 03da3a3

@papamarkou
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this commit breaks Julia's make. After git-pulling and make cleanall, make gives me this error:

theodore@camus:/opt/julia/julia_stable$ make -j 7
    CC test/libccalltest.so
ccalltest.c: In function ‘cgtest’:
ccalltest.c:121:19: error: ‘i’ undeclared (first use in this function)
     a += 1 - (2.0*i);
                   ^
ccalltest.c:121:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [libccalltest.so] Error 1
make: *** [julia-libccalltest] Error 2
make: *** Waiting for unfinished jobs....

I may have to try a fresh installation to be 100% this is a bug.

@psanan
Copy link

@psanan psanan commented on 03da3a3 Mar 24, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably be a capital I.

@ivarne
Copy link
Member Author

@ivarne ivarne commented on 03da3a3 Mar 24, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Scidom Soory, and thanks for noticing. Does 97b1870 fix the issue?

@papamarkou
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, works fine! Thanks both!

Please sign in to comment.