How to compile with pedantic and deal with warning 17?

Windows specific questions.
Post Reply
zerospeed
Posts: 227
Joined: Nov 04, 2005 15:29

How to compile with pedantic and deal with warning 17?

Post by zerospeed »

Hello,

I've been trying to compile several of my old programs with FB 0.22 and found lot of warnings 17 in them due usage of __FILE__:

Code: Select all

test\test_configuration_file.bas(7) warning 17(0): Possible escape sequence found in: "test\test_configuration_file.bas"
Since this is a #define, I've tried to use ## to concatenate $ and __FILE__ but that do not process properly.

Seems to me that the only solution to these issues will be FreeBASIC uses slashes instead of backslashes on Windows for __FILE__

Thoughts?

Thank you
fxm
Moderator
Posts: 12577
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Post by fxm »

compiler option: -w pedantic
is a shortcut of
compiler options: -w param -w Escape
see documentation:
http://www.freebasic.net/wiki/wikka.php ... mpilerOptw

To suppress warning due to escape sequence,
use only compiler option: -w param
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

We can fix __FILE__ (and the other built-in defines returning strings) to always prepend $. It should do that anyways.
fxm
Moderator
Posts: 12577
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Post by fxm »

Edit: post suppressed
Last edited by fxm on Jul 19, 2011 17:51, edited 1 time in total.
zerospeed
Posts: 227
Joined: Nov 04, 2005 15:29

Post by zerospeed »

dkl wrote:We can fix __FILE__ (and the other built-in defines returning strings) to always prepend $. It should do that anyways.
That will be great!

Shall I open a ticket on SourceForge, or this thread is enough?

Thank you!
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

I just committed a fix, so if that's ok, then we may aswell bypass Sourceforge.
zerospeed
Posts: 227
Joined: Nov 04, 2005 15:29

Post by zerospeed »

dkl wrote:I just committed a fix, so if that's ok, then we may aswell bypass Sourceforge.
Is on SVN trunk? would like do a local build to test it out.

Thank you.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

We switched from SVN to Git during the last weeks, so the SVN repository won't be updated anymore, all code is going here now: http://fbc.git.sourceforge.net/

See also this thread: http://www.freebasic.net/forum/viewtopic.php?t=18100
zerospeed
Posts: 227
Joined: Nov 04, 2005 15:29

Post by zerospeed »

dkl wrote:We switched from SVN to Git during the last weeks, so the SVN repository won't be updated anymore, all code is going here now: http://fbc.git.sourceforge.net/

See also this thread: http://www.freebasic.net/forum/viewtopic.php?t=18100
That is awesome news. I'm quite used to Git nowdays so is great that FB moved too (one less context switching tool to remember) ;-)

Thank you, once again!
Post Reply