FAQ  •  Register  •  Login

FASTCALL warnings

<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Thu Jul 19, 2012 9:43 pm

FASTCALL warnings

Hi,

Whenever compiling any ZX BASIC program that uses the latest BIFROST* interface library, it will always produce the following warnings:

  Code:
bifrost.bas:92: warning: FUNCTION 'BIFROSTfindAttr' declared as FASTCALL with 2 parameters
bifrost.bas:177: warning: SUB 'BIFROSTshowTile' declared as FASTCALL with 3 parameters
bifrost.bas:201: warning: SUB 'BIFROSTshowTilePos' declared as FASTCALL with 2 parameters
bifrost.bas:231: warning: SUB 'BIFROSTfillTileAttr' declared as FASTCALL with 3 parameters

In general, these warnings are very useful to notify the user about possible problems on the code. But in the cases when they were already validated (such as above where FASTCALL is used intentionally for performance reasons), they become a disadvantage: the user will always see warnings in every compilation and will soon start to ignore them completely, thus not paying attention anymore to new warnings that may appear about real problems in his/her own code.

I suggest a new directive to allow ignoring such warnings inside an specific library. The idea is that a library file could use something like this:

  Code:
#pragma push(fastcall_warning)
#pragma fastcall_warning = false
...
#pragma pop(fastcall_warning)

Makes sense?
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Thu Jul 19, 2012 10:32 pm

Re: FASTCALL warnings

Definitely! In fact, I'm implementing some enable/disable Warning flags (such as "Unused function", which is very handy for libraries, or this one).
They're on the way! :)
<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Thu Jul 19, 2012 10:46 pm

Re: FASTCALL warnings

boriel wrote:Definitely! In fact, I'm implementing some enable/disable Warning flags (such as "Unused function", which is very handy for libraries, or this one).
They're on the way! :)

Thank you!
<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Thu Aug 15, 2013 9:52 pm

Re: FASTCALL warnings

I could not find any information in ZX BASIC wiki about warning flags or pragma directives... so I'm wondering if this feature has been implemented already?
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Thu Aug 15, 2013 11:26 pm

Re: FASTCALL warnings

einar wrote:I could not find any information in ZX BASIC wiki about warning flags or pragma directives... so I'm wondering if this feature has been implemented already?

Sorry, I'm afraid not. :oops:
I stopped any further development on version 1.x.
Also I'm currently on vacation :roll:
<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Fri Aug 16, 2013 2:21 am

Re: FASTCALL warnings

No problem, thanks for the reply.

Enjoy your vacation! :)
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Thu Jan 30, 2014 3:28 pm

Re: FASTCALL warnings

Einar, hope you're still alive :|
Now that ZX BASIC 1.4 is out, I think we can start adding this feature. :wink:
<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Wed Feb 12, 2014 5:55 pm

Re: FASTCALL warnings

boriel wrote:Now that ZX BASIC 1.4 is out, I think we can start adding this feature. :wink:


Excellent!

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO