add __PRETTY_FUNCTION__
This commit is contained in:
parent
e7ffd7b1f7
commit
e0f6e43eb5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: err.c,v 1.44 2011/10/04 16:19:59 christos Exp $ */
|
||||
/* $NetBSD: err.c,v 1.45 2012/04/20 18:35:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: err.c,v 1.44 2011/10/04 16:19:59 christos Exp $");
|
||||
__RCSID("$NetBSD: err.c,v 1.45 2012/04/20 18:35:28 christos Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -375,7 +375,7 @@ const char *msgs[] = {
|
||||
"struct or union member name in initializer is a C9X feature",/* 313 */
|
||||
"%s is not a structure or a union", /* 314 */
|
||||
"GCC style struct or union member name in initializer", /* 315 */
|
||||
"__FUNCTION__ is a GCC extension", /* 316 */
|
||||
"__FUNCTION__/__PRETTY_FUNCTION__ is a GCC extension", /* 316 */
|
||||
"__func__ is a C9X feature", /* 317 */
|
||||
"variable array dimension is a C99/GCC extension", /* 318 */
|
||||
"compound literals are a C9X/GCC extension", /* 319 */
|
||||
@ -481,7 +481,7 @@ lerror(const char *file, int line, const char *msg, ...)
|
||||
(void)vfprintf(stderr, msg, ap);
|
||||
(void)fprintf(stderr, "\n");
|
||||
va_end(ap);
|
||||
exit(1);
|
||||
abort();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tree.c,v 1.70 2012/03/27 19:24:03 christos Exp $ */
|
||||
/* $NetBSD: tree.c,v 1.71 2012/04/20 18:35:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: tree.c,v 1.70 2012/03/27 19:24:03 christos Exp $");
|
||||
__RCSID("$NetBSD: tree.c,v 1.71 2012/04/20 18:35:28 christos Exp $");
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -182,7 +182,9 @@ getnnode(sym_t *sym, int ntok)
|
||||
error(99, sym->s_name);
|
||||
} else {
|
||||
int fixtype;
|
||||
if (strcmp(sym->s_name, "__FUNCTION__") == 0) {
|
||||
if (strcmp(sym->s_name, "__FUNCTION__") == 0 ||
|
||||
strcmp(sym->s_name, "__PRETTY_FUNCTION__")
|
||||
== 0) {
|
||||
gnuism(316);
|
||||
fixtype = 1;
|
||||
} else if (strcmp(sym->s_name, "__func__") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user