parent
f34aa7d9b7
commit
73b64e141f
@ -1119,7 +1119,7 @@ static int command(void)
|
||||
if (pc_deprecate!=NULL) {
|
||||
char *ptr=pc_deprecate+strlen(pc_deprecate)-1;
|
||||
/* remove trailing whitespace */
|
||||
while (*ptr<= ' ')
|
||||
while (ptr>=pc_deprecate && *ptr<= ' ')
|
||||
*ptr--='\0';
|
||||
} else {
|
||||
error(103); /* insufficient memory */
|
||||
|
@ -40,6 +40,11 @@ set_tests_properties(unused_symbol_line_gh_252 PROPERTIES PASS_REGULAR_EXPRESSIO
|
||||
.*\\.pwn\\(1\\) : warning 203: symbol is never used: \\\"x\\\"
|
||||
")
|
||||
|
||||
add_compiler_test(gh_283 ${CMAKE_CURRENT_SOURCE_DIR}/gh_283.pwn)
|
||||
set_tests_properties(gh_283 PROPERTIES PASS_REGULAR_EXPRESSION "\
|
||||
.*\\.pwn\\(5\\) : warning 234: function is deprecated \\(symbol \"print\"\\)\
|
||||
")
|
||||
|
||||
# Crashers
|
||||
#
|
||||
# These tests simply check that the compiler doesn't crash.
|
||||
|
6
source/compiler/tests/gh_283.pwn
Normal file
6
source/compiler/tests/gh_283.pwn
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma deprecated
|
||||
native print(const string[]);
|
||||
|
||||
main() {
|
||||
print("Hello World");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user