This is the mail archive of the gcc@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]

Generating custom warning messages.


(Thanx to all who helped me get my PDBUG back and running for egcs...)

	I've developed some class libraries for my client whose programmers are
dependent upon when writing their applications. One I am currently
working on is about to undergo some significant changes as I'm adding
exception handling to it. This will result in the programmers using some
alternative method calls (simple method overloading) but I will, for
now, keep supporting the old calls as well so as not to break any of the
existing application code.

	What I would like to be able to do is generate a warning message during
compile/link time whenever a deprecated method is called and have it
suggest use of the new one. This would allow all existing code to
build/run but also make it easier for those who want to update their old
code to find where they need to make changes.

	Is such a thing possible? I've seen compilers that support #pragma
error <msg> but not warnings. Also, can the warning be generated only
when a call actually resolves to the deprecated method? Certainly this
would be an extremely useful feature for developers but can it be
implemented?

	Appreciate any ideas in this matter,

		Ben Scherrey


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