* lib/readline.h: Include <stdlib.h>.
(readline): Declare that deallocation must happen through 'free'.
+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ readline: Improve GCC 11 allocation-deallocation checking.
+ * lib/readline.h: Include <stdlib.h>.
+ (readline): Declare that deallocation must happen through 'free'.
+
2021-08-07 Bruno Haible <bruno@clisp.org>
read-file: Improve GCC 11 allocation-deallocation checking.
# include <stdio.h>
# include <readline/readline.h>
#else
+# include <stdlib.h>
/* Prints a prompt PROMPT and then reads and returns a single line of
text from the user. If PROMPT is NULL or the empty string, no
prompt is displayed. The returned line is allocated with malloc;
the caller should free the line when it has finished with it. */
-extern char *readline (const char *prompt);
+extern char *readline (const char *prompt)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#endif
#endif /* GL_READLINE_H */