This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add attribute "artificial"


Mark Mitchell wrote:
Devang Patel wrote:

As we discussed on Friday, this patch adds new attribute - artificial.

STABS:

We do not need to set DECL_IGNORED_P bit. So, instead of removing debug info. this patch updates the debug info. Inliner is updated to adjust location info when "artificial" attribute is seen.

DWARF:

Setting DECL_ARTIFICIAL did not work because it does not survive after duplicate_decls() etc. Plus C++ version takes different action based on whether DECL_ARTIFICIAL is set or not. If we really want to pursue that route then further changes will be required. This patch does not overload DECL_ARTIFICIAL and keeps everything clean and separate.


You are correct: setting DECL_ARTIFICIAL is not right. DECL_IGNORED+P is what we should set. And, that should be debug backend independent; there should be no need to modify the DWARF or DBX backends.

OK, Dan tells me that bringing up DECL_IGNORED_P was idiotic. So, I'll retract that bit. I do still think that "artificial" is a weird name for this attribute. It doesn't mean anything to people who aren't GCC hackers.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]