summaryrefslogtreecommitdiff
path: root/gdb/ada-lex.l
diff options
context:
space:
mode:
authorPaul N. Hilfinger <hilfinger@adacore.com>2004-10-06 09:28:55 +0000
committerPaul N. Hilfinger <hilfinger@adacore.com>2004-10-06 09:28:55 +0000
commit247ce538a48b4d211c05286312ee1ad7b4bf5518 (patch)
tree9ed5ce8a7f2d05bed4e3dc8c6a2381a7adcc575a /gdb/ada-lex.l
parent3ddf685c7fa6ba4940def9c14b2ccf76bd4ff842 (diff)
downloadgdb-247ce538a48b4d211c05286312ee1ad7b4bf5518.tar.gz
2004-10-06 Paul N. Hilfinger <Hilfinger@gnat.com>
* Makefile.in (.l.c): Do conversions of names of alloc and free functions that are done for .y.c files, plus special one for yy_flex_realloc. Also, correct missing-file tests here. * ada-lex.l (malloc, free): Remove macros. (resize_tempbuf): Use "realloc"; rely on sed changes to convert to xrealloc. (ada_flex_use): Dummy definition to remove warnings about unused functions. * ada-exp.y (dummy_string_to_ada_operator): Temporary definition to suppress warning.
Diffstat (limited to 'gdb/ada-lex.l')
-rw-r--r--gdb/ada-lex.l11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 10870581a61..e4b8999d4e4 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -42,8 +42,6 @@ EXP (e[+-]{NUM10})
POSEXP (e"+"?{NUM10})
%{
-#define malloc xmalloc
-#define free xfree
#define NUMERAL_WIDTH 256
#define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
@@ -349,7 +347,7 @@ resize_tempbuf (unsigned int n)
if (tempbufsize < n)
{
tempbufsize = (n+63) & ~63;
- tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
+ tempbuf = (char *) realloc (tempbuf, tempbufsize);
}
}
@@ -923,3 +921,10 @@ yywrap(void)
{
return 1;
}
+
+/* Dummy definition to suppress warnings about unused static definitions. */
+typedef void (*dummy_function) ();
+dummy_function ada_flex_use[] =
+{
+ (dummy_function) yyrealloc, (dummy_function) yyunput
+};