| I think C99 does. The gnu compiler seems to allow
it. But to keep compatibility this should be fixed.
>
> Hello,
>
> I am wondering why no one else has noticed this yet. Do
> newer C compilers allow variable declarations to come
> after non-declaration code??
>
> In csound.c, line 1140:
>
> int kperfThread(void * cs) {
> INSDS *start, *end;
> CSOUND *csound = (CSOUND *)cs;
> OPDS *opstart;
>
> void *threadId = csound->GetCurrentThreadID();
>
> int index = getThreadIndex(csound, threadId);
>
> int numThreads = csound->oparms->numThreads;
>
> if(index < 0) {
> return -1;
> }
>
> void *barrier1 = csound->multiThreadedBarrier1;
> void *barrier2 = csound->multiThreadedBarrier2;
>
>
> I need to move the void *barrierN declarations before the
> if statement in order for this to compile. (There are a
> few more instances of this error later in the file as
> well).
>
> There were several similar problems in vectorial.c with
> four instances of a "long r" declaration.
>
> I also had this error:
>
> Error: illegal implicit conversion from 'int (*)(void *)'
> to 'unsigned long (*)(void *)'
> main.c line 378 t->threadId =
> csound->CreateThread(&kperfThread, (void *)csound);
> Project: Csound5.cw8.mcp, Target: Csound5Lib Debug, Source
> File: main.c
>
> So, it seems that kperfThread needs to return an unsigned
> long and therefore that the line "return -1" needs to be
> changed.
>
> I have made all of these changes and committed to CVS
> EXCEPT for the "return -1" line in kperfThread. I am not
> sure what the correction to that should be (if anything)
> -- it compiles fine for me with the -1 being implicitly
> converted to unsigned long.
>
> Anthony
>
>
> ----------------------------------------------------------
> --------------- This SF.net email is sponsored by DB2
> Express Download DB2 Express C - the FREE version of DB2
> express and take control of your XML. No limits. Just
> data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |