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

removed c89 restriction #2

Closed
wants to merge 5 commits into from
Closed

removed c89 restriction #2

wants to merge 5 commits into from

Conversation

sigmike
Copy link

@sigmike sigmike commented Dec 25, 2013

I had to remove the c89 restriction to make nn build.
Otherwise I get this error:

In file included from generic/THVector.c:1:0,
                from /home/mike/.local/include/torch/TH/THVector.h:566,
                from /home/mike/.local/include/torch/TH/TH.h:11,
                from /home/mike/devel/nn/init.c:1:
/home/mike/.local/include/torch/TH/generic/THVector.c:6:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
 static TH_INLINE void THVector_(fill)(real *x, const real c, const long n) {

The reason is torch was built without the c89 restriction, so TH_INLINE was defined to inline and used in THVector.c. In c89, the inline keyword doesn't seem to be recognized so it fails when nn is built.

Is this c89 flag mandatory for nn?

@andresy
Copy link
Member

andresy commented Jan 9, 2014

i will try to fix this soon.
i certainly to not want to remove the c89 restriction.

@blakeMilner
Copy link

Still getting this error even though c89 is not being used.

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

Successfully merging this pull request may close these issues.

6 participants