flex HAVE_DECL___FUNC__

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

flex HAVE_DECL___FUNC__

Michael Mikonos
Hello,

When reviewing flex's config.h I think we could enable
HAVE_DECL___FUNC__. This allows the flex_die() macro
to include __func__ in its output. For example:

 flex: fatal internal error at main.c:146 (flex_main): spooky error

Does this look OK?

- Michael


Index: config.h
===================================================================
RCS file: /cvs/src/usr.bin/lex/config.h,v
retrieving revision 1.6
diff -u -p -u -r1.6 config.h
--- config.h 16 Sep 2019 17:30:16 -0000 1.6
+++ config.h 29 Oct 2019 02:23:17 -0000
@@ -136,6 +136,8 @@
 
 #define HAVE_ASSERT_H 1
 
+#define HAVE_DECL___FUNC__ 1
+
 /* Define to 1 if the system has the type `_Bool'. */
 #define HAVE__BOOL 1
 

Reply | Threaded
Open this post in threaded view
|

Re: flex HAVE_DECL___FUNC__

Todd C. Miller-3
On Tue, 29 Oct 2019 11:06:28 +0800, Michael Mikonos wrote:

> When reviewing flex's config.h I think we could enable
> HAVE_DECL___FUNC__. This allows the flex_die() macro
> to include __func__ in its output. For example:
>
>  flex: fatal internal error at main.c:146 (flex_main): spooky error
>
> Does this look OK?

Yes, that looks correct.  OK millert@

 - todd