[Kdenlive-devel] FFT problem: error: expected expression before ‘/’ token

Dan Dennedy dan at dennedy.org
Tue Nov 16 18:45:47 UTC 2010


On Mon, Nov 15, 2010 at 10:46 PM, Simon Eugster <simon.eu at gmail.com> wrote:
> 2010/11/15 Dan Dennedy <dan at dennedy.org>:
>> On Mon, Nov 15, 2010 at 2:52 AM, jb <jb at kdenlive.org> wrote:
>>> On Monday 15 November 2010 10.06:23 Simon Eugster wrote:
>>>> Good morning,
>>>
>>>> /data/cworkspace/kdenlive.git/kdenlive/src/kiss_fft/kiss_fft.c:393:
>>>> error: expected expression before ‘/’ token
>>>> make[2]: *** [src/cmake_bindir/CMakeFiles/kdenlive.dir/kiss_fft/kiss_fft.o]
>>>> Fehler 1
>>>>
>>>> Any hint?
>>>
>>> Yes. C code does not accept comments starting with //
>>> You must use /* ... */ for your comments.
>
> Man. I really didn't know that.
>
>> I use // style comments in my C code all the time except public
>> headers for portability. Of course, I am referring to C99. Obviously,
>> he does not want to have to modify all of this existing code he is
>> reusing, so it must come down to a compiler flag. Is somebody adding
>> '-ansi' ?
>
> I just tried to add the --std=c99 flag in CMakeLists.txt, but
> somewhere these flags are set:
>> Cflags: -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common
> (added «message(C flags: ${CMAKE_C_FLAGS})» at the end of

iso9899:1990 is synonymous with -ansi:

http://gcc.gnu.org/onlinedocs/gcc-4.4.5/gcc/C-Dialect-Options.html#C-Dialect-Options

I am getting away with it in MLT because I do not specify a std, which
means it enables some extensions by default (--std=gnu89).

> CMakeLists.txt to display them.)
> -ansi is not used (at least git grep did not find it); how could I
> switch to C99?

not sure. Thus far, I am not finding cmake transparent or at-all obvious.

> (Or is there any drawback in doing so?)

Only drawback is that it would not compile with some odd-ball
compiler. I am quite sure intel cc would accept it and probably even
msvc. However, perhaps not some special embedded OS compiler. The
latter point is becoming moot with the ubiquity of Linux and gcc.
Other than that, some blowhards will give you the pedantic correctness
argument.

-- 
+-DRD-+




More information about the Kdenlive mailing list