From cmills at freeshell.org Thu Dec 2 12:07:59 2004 From: cmills at freeshell.org (Charles Mills) Date: Thu Dec 2 12:07:10 2004 Subject: [Dbc-talk] release In-Reply-To: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> Message-ID: On Nov 30, 2004, at 1:30 PM, Charles Mills wrote: > Seems like a good time to do another release. Any know problems....? > looks like 'create directories' bug still needs to be fixed. > Well I did some testing using Sebastian's $(CC) replacement script on a couple open source projects and haven't found any bugs. I just added support for creating directories and bitwise operations in the OCL. I didn't add them in earlier because I wasn't sure what to make their precedence, but I'll just make it the same as in C :-/ Any other known bugs? -Charlie From pinguin751 at gmx.net Thu Dec 2 16:50:19 2004 From: pinguin751 at gmx.net (sebastian) Date: Thu Dec 2 16:48:46 2004 Subject: [Dbc-talk] release In-Reply-To: References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> Message-ID: <20041202225019.4f26b010.pinguin751@gmx.net> (...) > > Any other known bugs? not yet :) ... looks really good - lets release a release :) seb -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From cmills at freeshell.org Thu Dec 2 18:36:10 2004 From: cmills at freeshell.org (Charles Mills) Date: Thu Dec 2 18:35:26 2004 Subject: [Dbc-talk] release In-Reply-To: <20041202225019.4f26b010.pinguin751@gmx.net> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> Message-ID: On Dec 2, 2004, at 1:50 PM, sebastian wrote: > (...) >> >> Any other known bugs? > > not yet :) ... looks really good - lets release a release :) > OK. I uploaded the files. http://rubyforge.org/frs/?group_id=354 Also tagged the release. I haven't been merging bug fixes back into the previous releases... haven't really seen a reason too. Just got one development branch :-) Added an announcement here: http://dbc.rubyforge.org/wiki/wiki.pl Thanks for all the help with this. -Charlie From sgeorge at mega-tokyo.com Sat Dec 4 15:33:42 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Sat Dec 4 15:29:26 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> Message-ID: <41B21F26.4020706@mega-tokyo.com> Im writing a ruby extension (very simple one) and I thought I'd test dbc on it.. Straight away some problems, regarding my compiler. Every compiler has defaults... it would be nice to have a switch in dbc such as -cc=gcc or -cc=msvc6 -cc=msvc7 -cc=watcom etc... In testing, dbcparse fell over because it included things like stdlib.h, but the win32 versions do checks on compiler, eg: #if _MSC_VER > 1000 #pragma once #endif with VS6 _MSC_VER = 1200 (12.00.8804) VS7(or .net sdk) = 1310 (13.10.3077) but the biggest one was the lack of _WIN32 defined... a quick -D_WIN32 -D_MSC_VER=1200 works fine for most things. I tested with #ifndef __GNUC__ #error Not GNU C Compiler #endif #include void main(void) { printf("hello world"); } and dbcparse throws the #error Not GNU C Compiler at me. and dbcparse fails on cygwin as it cant find the include directory (there is no INCLUDE defined, since its a unixlike distribution)... /usr/include should work.. but.. I think this is because ruby runs outside of the cygwin environment. (probably not worth fixing) food for thought anyway... -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From sgeorge at mega-tokyo.com Sat Dec 4 15:46:41 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Sat Dec 4 15:42:25 2004 Subject: [Dbc-talk] __cdecl spec Message-ID: <41B22231.7020606@mega-tokyo.com> dbc does not like typedef int (__cdecl * _onexit_t)(void); also; int __cdecl MyFunc(int x); int MyFunc(int x) { return x; } (I think it doesnt like the __cdecl spec) -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From cmills at freeshell.org Mon Dec 6 19:11:38 2004 From: cmills at freeshell.org (Charles Mills) Date: Mon Dec 6 19:10:40 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <41B21F26.4020706@mega-tokyo.com> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> Message-ID: <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> On Dec 4, 2004, at 12:33 PM, Stuart George wrote: > Im writing a ruby extension (very simple one) and I thought I'd test > dbc on it.. > > Straight away some problems, regarding my compiler. > > Every compiler has defaults... it would be nice to have a switch > in dbc such as -cc=gcc or -cc=msvc6 -cc=msvc7 -cc=watcom etc... > I think this is a good idea. It will require some research into different compilers... -Charlie From sgeorge at mega-tokyo.com Tue Dec 7 13:58:40 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Tue Dec 7 13:54:16 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> Message-ID: <41B5FD60.5040606@mega-tokyo.com> Charles Mills wrote: > On Dec 4, 2004, at 12:33 PM, Stuart George wrote: > >> Im writing a ruby extension (very simple one) and I thought I'd test >> dbc on it.. >> >> Straight away some problems, regarding my compiler. >> >> Every compiler has defaults... it would be nice to have a switch >> in dbc such as -cc=gcc or -cc=msvc6 -cc=msvc7 -cc=watcom etc... >> > I think this is a good idea. It will require some research into > different compilers... > the best way would be to have the preprocessor do its work, then we dbcparse that output... and we avoide 100% of the #define type problems. -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From cmills at freeshell.org Tue Dec 7 18:24:44 2004 From: cmills at freeshell.org (Charles Mills) Date: Tue Dec 7 18:23:52 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <41B5FD60.5040606@mega-tokyo.com> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> Message-ID: <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> On Dec 7, 2004, at 10:58 AM, Stuart George wrote: > Charles Mills wrote: >> On Dec 4, 2004, at 12:33 PM, Stuart George wrote: >>> Im writing a ruby extension (very simple one) and I thought I'd test >>> dbc on it.. >>> >>> Straight away some problems, regarding my compiler. >>> >>> Every compiler has defaults... it would be nice to have a switch >>> in dbc such as -cc=gcc or -cc=msvc6 -cc=msvc7 -cc=watcom etc... >>> >> I think this is a good idea. It will require some research into >> different compilers... > > the best way would be to have the preprocessor do its work, > then we dbcparse that output... and we avoide 100% of the > #define type problems. > Yeah, the only problem is preprocessing typically gets rid of comments. However, gcc has an option to leave the comments in again. Things would have to be preprocessed twice, since the ocl may have macros in it. The other problem is when dbcparse.rb encounters an error the line number of the error might be way off. Anyway, I don't think either of those problems are insurmountable. What file extensions would be used? file.c => preprocessor gives file.? => dbcparse.rb gives file.? => preprocessor and compiler gives file.o Would this work? gcc -E file.c | dbcparse.rb > file.? gcc -o file.o file.? I have also been thinking about the -cc=gcc type options. This could be used to solve the problems Sebastian was having.... -cc=gcc-3.3.4 or something and then pull the major, minor, etc numbers using a regexp. -Charlie From sebastian.ssmoller at web.de Wed Dec 8 01:42:31 2004 From: sebastian.ssmoller at web.de (sebastian ssmoller) Date: Wed Dec 8 01:40:44 2004 Subject: [Dbc-talk] __cdecl spec In-Reply-To: <41B22231.7020606@mega-tokyo.com> References: <41B22231.7020606@mega-tokyo.com> Message-ID: <20041208074231.2c3f8644.sebastian.ssmoller@web.de> On Sat, 04 Dec 2004 20:46:41 +0000 Stuart George wrote: > > dbc does not like > > typedef int (__cdecl * _onexit_t)(void); > > also; > > int __cdecl MyFunc(int x); > int MyFunc(int x) > { > return x; > } > > (I think it doesnt like the __cdecl spec) gcc doesnt seem to like it either ... so this is is a "missing compiler predefs" prob too ? seb > > -- > ---[ Stu George ]--- > > Blog : http://mega-tokyo.com/blog > Photo Gallery : http://mega-tokyo.com/gallery > OS-Development FAQ : http://mega-tokyo.com/osfaq2 > Public Key : http://mega-tokyo.com/me/stuart_george.asc > _______________________________________________ > Dbc-talk mailing list > Dbc-talk@rubyforge.org > http://rubyforge.org/mailman/listinfo/dbc-talk > -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From pinguin751 at gmx.net Wed Dec 8 01:50:08 2004 From: pinguin751 at gmx.net (sebastian) Date: Wed Dec 8 01:48:21 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> Message-ID: <20041208075008.666948a2.pinguin751@gmx.net> i guess the question is: how much compiler dependend parsing needs dbcparse.rb to do ? including all the compiler predefs for different compilers and different versions creates a bunch of code which needs to be maintained of course too ... another idea is: there are only some major predefs (e.g. something like compatibility mode for --compat=(gcc|win32|freebsd|cygwin|vc++) etc) in dbcparse.rb and the rest can be defined by the user using"-D" command line options. so the idea is maybe to create some kind of basic profiles instead of including all these compiler predefs ... just some thoughts ... seb -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From sgeorge at mega-tokyo.com Wed Dec 8 13:00:53 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Wed Dec 8 12:56:35 2004 Subject: [Dbc-talk] __cdecl spec In-Reply-To: <20041208074231.2c3f8644.sebastian.ssmoller@web.de> References: <41B22231.7020606@mega-tokyo.com> <20041208074231.2c3f8644.sebastian.ssmoller@web.de> Message-ID: <41B74155.5070902@mega-tokyo.com> sebastian ssmoller wrote: > On Sat, 04 Dec 2004 20:46:41 +0000 > Stuart George wrote: > > >>dbc does not like >> >>typedef int (__cdecl * _onexit_t)(void); >> >>also; >> >>int __cdecl MyFunc(int x); >>int MyFunc(int x) >>{ >> return x; >>} >> >>(I think it doesnt like the __cdecl spec) > > > gcc doesnt seem to like it either ... so this is is a "missing compiler > predefs" prob too ? > my gcc (3.3.3) did not throw any error with the cdecl spec even with -Wall -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From sgeorge at mega-tokyo.com Wed Dec 8 13:02:24 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Wed Dec 8 12:57:58 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <20041208075008.666948a2.pinguin751@gmx.net> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> Message-ID: <41B741B0.5010206@mega-tokyo.com> sebastian wrote: > i guess the question is: how much compiler dependend parsing needs > dbcparse.rb to do ? > > including all the compiler predefs for different compilers and different > versions creates a bunch of code which needs to be maintained of course > too ... > a yaml file, so its nice and user editable would be ideal for storing the base defaults. it would overcome the preproc stripping comments and compilers not support preprocessing only... and I agree about the basic profiles, rather than maintaingint 100 defaults for each compiler. just things like base version number, etc etc. nothing too big. 3 or 4 defines per compiler? -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From pinguin751 at gmx.net Thu Dec 9 10:55:47 2004 From: pinguin751 at gmx.net (sebastian) Date: Thu Dec 9 10:54:11 2004 Subject: [Dbc-talk] __cdecl spec In-Reply-To: <41B74155.5070902@mega-tokyo.com> References: <41B22231.7020606@mega-tokyo.com> <20041208074231.2c3f8644.sebastian.ssmoller@web.de> <41B74155.5070902@mega-tokyo.com> Message-ID: <20041209165547.6f699ce2.pinguin751@gmx.net> (...) > > > >>dbc does not like > >> > >>typedef int (__cdecl * _onexit_t)(void); > >> > >>also; > >> > >>int __cdecl MyFunc(int x); > >>int MyFunc(int x) > >>{ > >> return x; > >>} > >> > >>(I think it doesnt like the __cdecl spec) > > > > > > gcc doesnt seem to like it either ... so this is is a "missing > > compiler > > predefs" prob too ? > > > my gcc (3.3.3) did not throw any error with the cdecl spec even with > -Wall funny - i use exactly the same gcc version (on fbsd) with exactly the code above and i get : cpp25.c:2: error: syntax error before '*' token cpp25.c:4: error: syntax error before "MyFunc" did i miss something - i never used this __cdecl before ... seb (...) -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From sgeorge at mega-tokyo.com Thu Dec 9 13:15:25 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Thu Dec 9 13:11:38 2004 Subject: [Dbc-talk] __cdecl spec In-Reply-To: <20041209165547.6f699ce2.pinguin751@gmx.net> References: <41B22231.7020606@mega-tokyo.com> <20041208074231.2c3f8644.sebastian.ssmoller@web.de> <41B74155.5070902@mega-tokyo.com> <20041209165547.6f699ce2.pinguin751@gmx.net> Message-ID: <41B8963D.7090900@mega-tokyo.com> sebastian wrote: >> >>my gcc (3.3.3) did not throw any error with the cdecl spec even with >>-Wall > > > funny - i use exactly the same gcc version (on fbsd) with exactly the > code above and i get : > > cpp25.c:2: error: syntax error before '*' token > cpp25.c:4: error: syntax error before "MyFunc" > > did i miss something - i never used this __cdecl before ... > int __cdecl MyFunc(int x); int MyFunc(int x) { return x; } int main(void) { return 1 + MyFunc(1); } works fine, no errors, gcc -Wall cdecl_test.c -o cdelc_test.exe Id try it under DragonFlyBSD but im not sure if HEAD is 2.95 or 3.something yet... cdecl tells the compiler this function uses C calling convention (the alternative is PASCAL calling convention). stdcall == cdecl. (changes the order parameters are pushed onto the stack in, cdelc is right to left, pascal is left to right) -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From pinguin751 at gmx.net Thu Dec 9 11:03:40 2004 From: pinguin751 at gmx.net (sebastian) Date: Thu Dec 9 17:37:31 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <41B741B0.5010206@mega-tokyo.com> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> Message-ID: <20041209170340.4603db4e.pinguin751@gmx.net> hi, i opened a feature request for that topic - lets discuss the pro and cons there or lets move at least the facts to the tracker so nothing is lost (in space) ... http://rubyforge.org/tracker/index.php?func=detail&aid=1183&group_id=354&atid=1431 seb --"Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From cmills at freeshell.org Fri Dec 10 12:25:13 2004 From: cmills at freeshell.org (Charles Mills) Date: Fri Dec 10 12:24:15 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <20041209170340.4603db4e.pinguin751@gmx.net> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> Message-ID: <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> On Dec 9, 2004, at 8:03 AM, sebastian wrote: > > hi, > i opened a feature request for that topic - lets discuss the pro and > cons there or lets move at least the facts to the tracker so nothing > is lost (in space) ... > > http://rubyforge.org/tracker/index.php? > func=detail&aid=1183&group_id=354&atid=1431 > > I added a preliminary version to CVS based on info from here http://predef.sourceforge.net/precomp.html and compiler manuals I found with google. Please take a look. Stuart mentioned using YAML config files. Another option (different from what I just added) would be to used .h files and add the -include "header.h" command line functionality (which needs to be added anyway). Food for thought. -Charlie From pinguin751 at gmx.net Fri Dec 10 15:04:32 2004 From: pinguin751 at gmx.net (sebastian) Date: Fri Dec 10 15:02:38 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> Message-ID: <20041210210432.48276bad.pinguin751@gmx.net> (...) > I added a preliminary version to CVS based on info from here > http://predef.sourceforge.net/precomp.html > and compiler manuals I found with google. > Please take a look. looks cool - except that i am not sure whether dbcparse is the right place for that code ... guess this needs some refactoring later on ... ;-) > > Stuart mentioned using YAML config files. Another option (different > from what I just added) would be to used .h files and add the -include > "header.h" command line functionality (which needs to be added > anyway). (...) sounds interesting (using separate header file) - this would separate the predefs from the actual parsing process and i guess it would be easier to maintain than the current approach - like it:) i checked test_cpp/cpp25.c and i still get errors caused by __cdecl :( dbcparse.rb:cpp25.c:4: parse error on "*" seb -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From cmills at freeshell.org Fri Dec 10 15:10:56 2004 From: cmills at freeshell.org (Charles Mills) Date: Fri Dec 10 15:09:49 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <20041210210432.48276bad.pinguin751@gmx.net> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> <20041210210432.48276bad.pinguin751@gmx.net> Message-ID: <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> On Dec 10, 2004, at 12:04 PM, sebastian wrote: > (...) > >> I added a preliminary version to CVS based on info from here >> http://predef.sourceforge.net/precomp.html >> and compiler manuals I found with google. >> Please take a look. > > looks cool - except that i am not sure whether dbcparse is the right > place for that code ... guess this needs some refactoring later on ... > ;-) > Yeah, I thought about putting it in the preprocessor, but that seemed like a bad idea, since embedding platform specific configuration information in an object is usually not good. Could go in another .rb file maybe? >> >> Stuart mentioned using YAML config files. Another option (different >> from what I just added) would be to used .h files and add the -include >> "header.h" command line functionality (which needs to be added >> anyway). > (...) > > sounds interesting (using separate header file) - this would separate > the predefs from the actual parsing process and i guess it would be > easier to maintain than the current approach - like it:) > > > i checked test_cpp/cpp25.c and i still get errors caused by __cdecl :( > > dbcparse.rb:cpp25.c:4: parse error on "*" > > Hmm... I am not getting this error... did you run `ruby setup.rb config`? -Charlie From pinguin751 at gmx.net Fri Dec 10 16:36:52 2004 From: pinguin751 at gmx.net (sebastian) Date: Fri Dec 10 16:35:13 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> <20041210210432.48276bad.pinguin751@gmx.net> <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> Message-ID: <20041210223652.4fc20fbc.pinguin751@gmx.net> > > > >> I added a preliminary version to CVS based on info from here > >> http://predef.sourceforge.net/precomp.html > >> and compiler manuals I found with google. > >> Please take a look. > > > > looks cool - except that i am not sure whether dbcparse is the right > > place for that code ... guess this needs some refactoring later on > > ... > > ;-) > > > > Yeah, I thought about putting it in the preprocessor, but that seemed > like a bad idea, since embedding platform specific configuration > information in an object is usually not good. > Could go in another .rb file maybe? i prefer the header file idea :) (see below) > > >> > >> Stuart mentioned using YAML config files. Another option > >(different > >> from what I just added) would be to used .h files and add the > >-include > >> "header.h" command line functionality (which needs to be added > >> anyway). > > (...) > > > > sounds interesting (using separate header file) - this would > > separate > > the predefs from the actual parsing process and i guess it would be > > easier to maintain than the current approach - like it:) > > > > > > i checked test_cpp/cpp25.c and i still get errors caused by __cdecl > > :( > > > > dbcparse.rb:cpp25.c:4: parse error on "*" > > > > > Hmm... I am not getting this error... did you run `ruby setup.rb > config`? arhhh - my fault - just ignore this statement - works fine :) seb > > -Charlie > > _______________________________________________ > Dbc-talk mailing list > Dbc-talk@rubyforge.org > http://rubyforge.org/mailman/listinfo/dbc-talk > -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From cmills at freeshell.org Fri Dec 10 16:58:04 2004 From: cmills at freeshell.org (Charles Mills) Date: Fri Dec 10 16:56:58 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <20041210223652.4fc20fbc.pinguin751@gmx.net> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> <20041210210432.48276bad.pinguin751@gmx.net> <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> <20041210223652.4fc20fbc.pinguin751@gmx.net> Message-ID: <912952C8-4AF6-11D9-8923-000A95A27A10@freeshell.org> On Dec 10, 2004, at 1:36 PM, sebastian wrote: >> >> Stuart mentioned using YAML config files. Another option > (different >> from what I just added) would be to used .h files and add the > -include >> "header.h" command line functionality (which needs to be added >> anyway). > (...) > > sounds interesting (using separate header file) - this would > separate > the predefs from the actual parsing process and i guess it would be > easier to maintain than the current approach - like it:) OK. This leaves a couple issues: - Where to put the .h files. - How to handle version numbers (like gcc's major, minor, patch stuff). -Charlie From pinguin751 at gmx.net Fri Dec 10 17:32:51 2004 From: pinguin751 at gmx.net (sebastian) Date: Fri Dec 10 17:30:56 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <912952C8-4AF6-11D9-8923-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> <20041210210432.48276bad.pinguin751@gmx.net> <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> <20041210223652.4fc20fbc.pinguin751@gmx.net> <912952C8-4AF6-11D9-8923-000A95A27A10@freeshell.org> Message-ID: <20041210233251.537524eb.pinguin751@gmx.net> On Fri, 10 Dec 2004 13:58:04 -0800 Charles Mills wrote: > On Dec 10, 2004, at 1:36 PM, sebastian wrote: > >> > >> Stuart mentioned using YAML config files. Another option > > (different > >> from what I just added) would be to used .h files and add the > > -include > >> "header.h" command line functionality (which needs to be added > >> anyway). > > (...) > > > > sounds interesting (using separate header file) - this would > > separate > > the predefs from the actual parsing process and i guess it would be > > easier to maintain than the current approach - like it:) > > OK. This leaves a couple issues: > - Where to put the .h files. what about : dbc/include or dbc/src/include guess cause the user usually will not edit these "configs" they could be placed under src ... > - How to handle version numbers (like gcc's major, minor, patch > stuff). i guess/hope it would be enough to only handle the majors ... e.g.: include/gcc2.h include/gcc3.h include/vc6.h include/vc7.h etc same for the command line switches: --cc=(gcc2|gcc3|vc6|...) seb -- "Perfection is achieved, not when there is nothing left to add, but when there is nothing left to take away." --- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 From sgeorge at mega-tokyo.com Fri Dec 10 17:42:57 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Fri Dec 10 17:38:26 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <912952C8-4AF6-11D9-8923-000A95A27A10@freeshell.org> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> <20041210210432.48276bad.pinguin751@gmx.net> <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> <20041210223652.4fc20fbc.pinguin751@gmx.net> <912952C8-4AF6-11D9-8923-000A95A27A10@freeshell.org> Message-ID: <41BA2671.2010402@mega-tokyo.com> Charles Mills wrote: > OK. This leaves a couple issues: > - Where to put the .h files. > - How to handle version numbers (like gcc's major, minor, patch stuff). > i havnt looked at it yet (was going to write the patch this weekend!) shouldnt the version numbers be defined? (ie: isnt that the entire point of the define --compat option??) i would just define major/minor. if someone depends on patchlevel X then let them define X. i think 2.95, 3.3, 3.4 would be sufficient for gcc versions to support? (__GNUC__, __GNUC_MINOR__ i will try and grab it on the weekend and look/test/alter;) it. i can work out the defines for msvc6/msvc .net2003 on the weekend. (that would be roughly _MSC_VER, _WIN32, WIN32, _WINDOWS??, MS_WIN32, __NT__, __WIN32__) watcom may or may not need __DOS4G__ for dos32 apps (should probably be a user define) not listed are the digital mars (symantec) c/c++ compilers, visual age from ibm, sgi, hpux, sun etc etc compilers... msvc _MSC_VER = 1100 = msvc++ 5.0 1200 = vis studio 6.0 1300 = vc++.net 2002 (7.0) 1310 = vc++.net 2003 (7.1) 1400 = vs++.net (8.0) intel compiler __INTEL_COMPILER = 600 (intel c/c+= 6.0) = 700 = (7.0) = 800 = (8.0) watcom c - __WATCOMC__ = 1100 == 11.00, 1200 = openwatcom 1.0, 1210+1220,1230 = openwatcom 1.1, 1.2, 1.3 etc metrowerks __MWERKS__ (hex encoded version, 0xFF00 = high, 0x00FF = low mask) = 0x2400 = metrowekrs codewarrior 2.4 (codewarrior 7) = 0x3000 = v3.0 (codewarrior 8) = 0x3200 = v3.2 (codewarrior 9) borland __BORLANDC_ = 0x550 = Borland C/C++ 5.5 = 0x551 = v5.51 = 0x560+0x564 = v5.60, v5.64 (Builder) -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc From sgeorge at mega-tokyo.com Fri Dec 10 17:52:12 2004 From: sgeorge at mega-tokyo.com (Stuart George) Date: Fri Dec 10 17:47:40 2004 Subject: [Dbc-talk] #define bugs In-Reply-To: <41BA2671.2010402@mega-tokyo.com> References: <0011D7A8-4317-11D9-BE37-000A95A27A10@freeshell.org> <20041202225019.4f26b010.pinguin751@gmx.net> <41B21F26.4020706@mega-tokyo.com> <902C5350-47E4-11D9-AD1B-000A95A27A10@freeshell.org> <41B5FD60.5040606@mega-tokyo.com> <2D4FFE70-48A7-11D9-ACA1-000A95A27A10@freeshell.org> <20041208075008.666948a2.pinguin751@gmx.net> <41B741B0.5010206@mega-tokyo.com> <20041209170340.4603db4e.pinguin751@gmx.net> <73591F0C-4AD0-11D9-8923-000A95A27A10@freeshell.org> <20041210210432.48276bad.pinguin751@gmx.net> <9A2A34AC-4AE7-11D9-8923-000A95A27A10@freeshell.org> <20041210223652.4fc20fbc.pinguin751@gmx.net> <912952C8-4AF6-11D9-8923-000A95A27A10@freeshell.org> <41BA2671.2010402@mega-tokyo.com> Message-ID: <41BA289C.50408@mega-tokyo.com> Stuart George wrote: i should add, I wasnt suggesting add every version i listed. just some major versions... (bugger added defines for 5.1, 5.2, 5.5, 5.50, 5.51, 5.52 etc!!) just common ones. (ie: 2 or 3 gcc, 3 msvc, 1 watcom) -- ---[ Stu George ]--- Blog : http://mega-tokyo.com/blog Photo Gallery : http://mega-tokyo.com/gallery OS-Development FAQ : http://mega-tokyo.com/osfaq2 Public Key : http://mega-tokyo.com/me/stuart_george.asc