🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2571

proposed preprocessor defined __FUNC__

#2571
From: Marty
Date: Fri, 28 Apr 1989 18:56
24 lines
1281 bytes
While seeing the preprocessor change  I'd figure I'd propose this.

I've used a number of Aztec C compilers (from Manx software systems) and
they had a builtin predefine called __FUNC__ which expanded to the  string
constant for the current C function name.

This allowed a nice way to stick in error messages without resorting to
__FILE__/__LINE__ combinations (which I've always found obscure).

Aztec had a combined preprocessor/parser, so this wasn't too hard for them
to do.  I'm not sure how hard it would be to add to gcc.

Any comments about the viability and usefulness of such a feature?
Any good ideas on how to implement it (if it was in the preprocessor, I
suppose the preprocessor would have to be able to parse C code and
determine the current function name).


marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  martin leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner
 
Technical Details
Message-ID: <890428-115654-4887@Xerox>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!XEROX.COM!Leisner.Henr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!XEROX.COM!Leisner.Henr
From: Leisner.Henr@XEROX.COM (Marty)
Newsgroups: gnu.gcc.bug
Subject: proposed preprocessor defined __FUNC__
Message-ID: <890428-115654-4887@Xerox>
Date: 28 Apr 89 18:56:38 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 24