On Mon, March 31, 2008 11:38 am, Phil Dibowitz wrote:
> Stephen Warren wrote:
>> On Sun, March 30, 2008 11:41 pm, Phil Dibowitz wrote:
>>> And again, you missed what I said about declarations not at the top.
>>> This
>>> is why we use -ansi -pedantic-errors:
>>>
>>> [EMAIL PROTECTED] tmp]$ gcc -std=c99 foo.c
>>> [EMAIL PROTECTED] tmp]$ gcc -std=c99 -pedantic-errors foo.c
>>> [EMAIL PROTECTED] tmp]$ gcc -ansi -pedantic-errors foo.c
>>> foo.c: In function 'main':
>>> foo.c:9: error: ISO C90 forbids mixed declarations and code
>>> [EMAIL PROTECTED] tmp]$
>>>
>>> It's the ONLY combination that seems to catch that error.
>>
>> Yes, but:
>>
>> a) There's no reason to care about this, because like I said, I believe
>> we
>> can fix the Windows build issues by building concordance.c as C++
>> instead
>> of C.
>
> No, I'd like to make sure concordance is a lowest-common-denominator
> client. I want it to be compiled as C.

Sorry, I should have been more explicit:

On Windows, build as C++ to work around C compiler not supporting C99.

Everywhere else, build as C, for the reasons you give.


>> b) Those gcc options cause gcc (some versions, e.g. 4.1.x, 4.3.x) to
>> fail to build concordance. Do we really want to prevent compilation
>> on Linux just so it works on Windows?
>
> I missed that it was an error for you, thought it was a warning. What if
> we change -pedantic-errors to -pedantic-warnings, does it then build for
> you?

* It certainly won't remove the warning about strdup not being prototyped
(that's due to -ansi), which is a warning for me, but I believe an error
on gcc-4.3 (hence why I submitted the patch for libconcord to add a bunch
of headers to help packaging libconcord on Fedora 9 which uses gcc-4.3)

* I think that solves the varargs macro problem for me (converting it to a
warning). I'm not 100% sure though; I'll have to check tonight. I have no
idea about gcc-4.3 in this case yet; I need to set up a Fedora 9 machine
(or chroot) to test with.

Then again, if that change is made, we won't catch C99 v.s. ANSI issues,
unless we're very diligent about checking the build logs.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to