Bugs item #1898219, was opened at 2008-02-20 23:03
Message generated for change (Comment added) made by yingying
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1898219&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: SQL 2.22
>Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Ying Zhang (yingying)
Assigned to: Fabian (mr-meltdown)
Summary: SQL: failed to compile due to merovingian

Initial Comment:
Hi,

Compiling stable branch on andorea (fedora 8) results in:

monet/stable/sql/src/backends/monet5/merovingian.mx: In function ‘main’:
monet/stable/sql/src/backends/monet5/merovingian.mx:1355: warning: ISO C90 
forbids mixed declarations and code

Configure options:

--enable-debug --enable-assert --disable-optimize --enable-strict

Regards,

Jennie

----------------------------------------------------------------------

>Comment By: Ying Zhang (yingying)
Date: 2008-02-21 11:06

Message:
Logged In: YES 
user_id=341633
Originator: YES

This is my complete compilation statement:

gcc -DHAVE_CONFIG_H -I. -I../../..
-I/ufs/zhang/monet/stable/sql/src/backends/monet5
-I/ufs/zhang/monet/stable/sql/src/backends/monet5 -I../../include
-I/ufs/zhang/monet/stable/sql/src/backends/monet5/../../include
-I../../common
-I/ufs/zhang/monet/stable/sql/src/backends/monet5/../../common
-I../../storage
-I/ufs/zhang/monet/stable/sql/src/backends/monet5/../../storage
-I../../server
-I/ufs/zhang/monet/stable/sql/src/backends/monet5/../../server
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5/atoms
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5/compiler
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5/kernel
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5/mal
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5/optimizer
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5/scheduler
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB5
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB/mapilib
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB/common
-I/export/scratch1/zhang/monet-install/stable/debug/include/MonetDB/gdk   
-Wall -Wextra -std=c99 -g -Werror-implicit-function-declaration -Werror
-Wpointer-arith -Wdeclaration-after-statement -Wundef
-Wp,-D_FORTIFY_SOURCE=2 -c merovingian.c

so the answer is yes.  I guess -Wdeclaration-after-statement doesn't like
mixed declarations and code.

----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2008-02-21 10:57

Message:
Logged In: YES 
user_id=963970
Originator: NO

my compilation statement is as follows:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.
-I/ufs/fabian/scratch/monetdb/stable
/sql/src/backends/monet5 -I../../..
-I/ufs/fabian/scratch/monetdb/stable/sql/src
/backends/monet5 -I../../include
-I/ufs/fabian/scratch/monetdb/stable/sql/src/ba
ckends/monet5/../../include -I../../common
-I/ufs/fabian/scratch/monetdb/stable/
sql/src/backends/monet5/../../common -I../../storage
-I/ufs/fabian/scratch/monet
db/stable/sql/src/backends/monet5/../../storage -I../../server
-I/ufs/fabian/scr
atch/monetdb/stable/sql/src/backends/monet5/../../server
-I/ufs/fabian/scratch/m
onetdb/stable/program-x86_64/include/MonetDB5/atoms
-I/ufs/fabian/scratch/monetd
b/stable/program-x86_64/include/MonetDB5/compiler
-I/ufs/fabian/scratch/monetdb/
stable/program-x86_64/include/MonetDB5/kernel
-I/ufs/fabian/scratch/monetdb/stab
le/program-x86_64/include/MonetDB5/mal
-I/ufs/fabian/scratch/monetdb/stable/prog
ram-x86_64/include/MonetDB5/optimizer
-I/ufs/fabian/scratch/monetdb/stable/progr
am-x86_64/include/MonetDB5/scheduler
-I/ufs/fabian/scratch/monetdb/stable/progra
m-x86_64/include/MonetDB5
-I/ufs/fabian/scratch/monetdb/stable/program-x86_64/in
clude/MonetDB
-I/ufs/fabian/scratch/monetdb/stable/program-x86_64/include/MonetD
B/mapilib
-I/ufs/fabian/scratch/monetdb/stable/program-x86_64/include/MonetDB -I
/ufs/fabian/scratch/monetdb/stable/program-x86_64/include/MonetDB/common
-I/ufs/
fabian/scratch/monetdb/stable/program-x86_64/include/MonetDB/gdk   
-march=athlon64 -pipe -g -W -Wall -std=c99 -fgnu89-inline -Werror
-D_FORTIFY_SOURCE=2 -c merovingian.c


I see -std=c99 in there, which makes me wonder if that doesn't allow me to
even use // as comment separator?  So in that case the compiler is right in
not making any noise about this ISO C90 constraint...

Jennie, do you have -std=c99 in your compilation log?

----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2008-02-21 10:50

Message:
Logged In: YES 
user_id=963970
Originator: NO

-Wall -Werror should do the trick, no?

I don't see any warnings or messages on stderr where warnings are sent to.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2008-02-21 10:45

Message:
Logged In: YES 
user_id=572415
Originator: NO

Fabian,

thanks for the fix.
gcc 4.2.3 should give the same warning --- however, it's considered an
error only with --enable-strict, which is not the default in the Stable
release branch ...

Stefan


----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2008-02-21 10:42

Message:
Logged In: YES 
user_id=963970
Originator: NO

1355:        pthread_t ctid = 0;

I see.  My compiler (gcc (GCC) 4.2.3 (Gentoo 4.2.3 p1.0)) just doesn't
apparently, maybe because I don't have -O? in CFLAGS.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1898219&group_id=56967

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to