Module Name: src
Committed By: christos
Date: Fri Apr 20 18:35:28 UTC 2012
Modified Files:
src/usr.bin/xlint/lint1: err.c tree.c
Log Message:
add __PRETTY_FUNCTION__
To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/xlint/lint1/tree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.44 src/usr.bin/xlint/lint1/err.c:1.45
--- src/usr.bin/xlint/lint1/err.c:1.44 Tue Oct 4 12:19:59 2011
+++ src/usr.bin/xlint/lint1/err.c Fri Apr 20 14:35:28 2012
@@ -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
(void)vfprintf(stderr, msg, ap);
(void)fprintf(stderr, "\n");
va_end(ap);
- exit(1);
+ abort();
}
void
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.70 src/usr.bin/xlint/lint1/tree.c:1.71
--- src/usr.bin/xlint/lint1/tree.c:1.70 Tue Mar 27 15:24:03 2012
+++ src/usr.bin/xlint/lint1/tree.c Fri Apr 20 14:35:28 2012
@@ -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) {