This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: RFC: gas .warning "msg" and .error "msg" directives?


On Nov 2, 2004, at 22:01, Hans-Peter Nilsson wrote:
How about .error and .warning directives, matching the following
texinfo snippet?  In contrast to .err or just using an undefined
pseudo, this allows the programmer to specify the output,
similar to #warn and #error in cpp.

+`.error STRING'
+     This directive emits an error with the message STRING.  If you
+     don't specify STRING, it defaults to `"(unspecified)"'.

Why not make it default to something that actually describes the situation, e.g., ".error directive invoked in source file". Conceptually, you could also make the message be required -- for .error that just means you print a slightly different message if it's omitted ("missing .error parameter" for example), the practical difference is whether .warning without a message would be an error or not. :-)


Ken


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