Deprecate __FILE__ and __LINE__ (#1072)

Unlike C, these constants are not convenient for logging in macros,
since they always report the same data (their location in the macro).

Fixes #1068
This commit is contained in:
Rangi
2022-09-30 13:48:30 -04:00
committed by GitHub
parent 68ad926279
commit a47da5f71f
13 changed files with 77 additions and 88 deletions

View File

@@ -2,6 +2,9 @@
export LC_ALL=C
# Game Boy release date, 1989-04-21T12:34:56Z (for reproducible test results)
export SOURCE_DATE_EPOCH=609165296
o="$(mktemp)"
gb="$(mktemp)"
input="$(mktemp)"
@@ -52,20 +55,6 @@ else
rm -f version.asm
fi
# Add the quote test, except on Windows
if uname | grep -viq mingw; then
cat > quote\"file.asm <<EOF
WARN __FILE__
EOF
cat > quote\"file.out <<EOF
EOF
cat > quote\"file.err <<EOF
warning: quote"file.asm(1): [-Wuser]
quote"file.asm
while expanding symbol "__FILE__"
EOF
fi
# Check whether to use '.simple.err' files if they exist
# (rgbasm with pre-3.0 Bison just reports "syntax error")
$RGBASM -Weverything -o $o syntax-error.asm > $output 2> $errput