mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
c: always use YYMALLOC/YYFREE
Reported by Kovalex <kovalex.pro@gmail.com>. https://lists.gnu.org/r/bug-bison/2020-08/msg00015.html * data/skeletons/yacc.c: Don't make direct calls to malloc/free. * tests/calc.at: Check it.
This commit is contained in:
@@ -915,6 +915,12 @@ AT_BISON_OPTION_PUSHDEFS([$1])
|
||||
|
||||
AT_DATA_CALC_Y([$1])
|
||||
AT_FULL_COMPILE(AT_JAVA_IF([[Calc]], [[calc]]), AT_DEFINES_IF([[lex], [main]], [[], []]), [$2], [-Wno-deprecated])
|
||||
|
||||
AT_YACC_IF(
|
||||
[# No direct calls to malloc/free.
|
||||
AT_CHECK([[$EGREP '(malloc|free) *\(' calc.[ch] | $EGREP -v 'INFRINGES ON USER NAME SPACE']],
|
||||
[1])])
|
||||
|
||||
AT_PUSH_IF([AT_JAVA_IF(
|
||||
[# Verify that this is a push parser.
|
||||
AT_CHECK_JAVA_GREP([[Calc.java]],
|
||||
|
||||
Reference in New Issue
Block a user