Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 add __PRETTY_FUNCTION__
details: https://anonhg.NetBSD.org/src/rev/e277060b0bc5
branches: trunk
changeset: 778926:e277060b0bc5
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 20 18:35:28 2012 +0000
description:
add __PRETTY_FUNCTION__
diffstat:
usr.bin/xlint/lint1/err.c | 8 ++++----
usr.bin/xlint/lint1/tree.c | 8 +++++---
2 files changed, 9 insertions(+), 7 deletions(-)
diffs (65 lines):
diff -r 9f4b85d684fa -r e277060b0bc5 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Fri Apr 20 18:28:43 2012 +0000
+++ b/usr.bin/xlint/lint1/err.c Fri Apr 20 18:35:28 2012 +0000
@@ -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 @@
"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 @@
(void)vfprintf(stderr, msg, ap);
(void)fprintf(stderr, "\n");
va_end(ap);
- exit(1);
+ abort();
}
void
diff -r 9f4b85d684fa -r e277060b0bc5 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Fri Apr 20 18:28:43 2012 +0000
+++ b/usr.bin/xlint/lint1/tree.c Fri Apr 20 18:35:28 2012 +0000
@@ -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 @@
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) {
Home |
Main Index |
Thread Index |
Old Index