diff -urp sources/binutils-2.22/gas/doc/as.texinfo binutils-2.22/gas/doc/as.texinfo --- sources/binutils-2.22/gas/doc/as.texinfo 2011-08-19 16:48:40.000000000 +0200 +++ binutils-2.22/gas/doc/as.texinfo 2012-03-23 16:59:59.000000000 +0100 @@ -4021,6 +4021,7 @@ Some machine configurations provide addi * Macro:: @code{.macro @var{name} @var{args}}@dots{} * MRI:: @code{.mri @var{val}} +* Nowarn:: @code{.nowarn} * Noaltmacro:: @code{.noaltmacro} * Nolist:: @code{.nolist} * Octa:: @code{.octa @var{bignums}} @@ -4100,6 +4101,7 @@ Some machine configurations provide addi * VTableInherit:: @code{.vtable_inherit @var{child}, @var{parent}} @end ifset +* Warn:: @code{.warn} * Warning:: @code{.warning @var{string}} * Weak:: @code{.weak @var{names}} * Weakref:: @code{.weakref @var{alias}, @var{symbol}} @@ -5460,6 +5462,10 @@ If @var{val} is non-zero, this tells @co affects code assembled until the next @code{.mri} directive, or until the end of the file. @xref{M, MRI mode, MRI mode}. +@node Nowarn +@section @code{.nowarn} +Disable assembler warnings. @xref{Warn}. + @node Noaltmacro @section @code{.noaltmacro} Disable alternate macro mode. @xref{Altmacro}. @@ -6546,6 +6552,10 @@ parent whose addend is the value of the parent name of @code{0} is treated as referring to the @code{*ABS*} section. @end ifset +@node Warn +@section @code{.warn} +Enable assembler warnings. @xref{Nowarn}. + @node Warning @section @code{.warning "@var{string}"} @cindex warning directive diff -urp sources/binutils-2.22/gas/read.c binutils-2.22/gas/read.c --- sources/binutils-2.22/gas/read.c 2011-11-21 10:29:29.000000000 +0100 +++ binutils-2.22/gas/read.c 2012-03-23 16:55:03.000000000 +0100 @@ -387,6 +387,7 @@ static const pseudo_typeS potable[] = { {"noformat", s_ignore, 0}, {"nolist", listing_list, 0}, /* Turn listing off. */ {"nopage", listing_nopage, 0}, + {"nowarn", s_warn, 0}, {"octa", cons, 16}, {"offset", s_struct, 0}, {"org", s_org, 0}, @@ -446,6 +447,7 @@ static const pseudo_typeS potable[] = { {"xdef", s_globl, 0}, {"xref", s_ignore, 0}, {"xstabs", s_xstab, 's'}, + {"warn", s_warn, 1}, {"warning", s_errwarn, 0}, {"weakref", s_weakref, 0}, {"word", cons, 2}, @@ -3454,6 +3456,14 @@ s_text (int ignore ATTRIBUTE_UNUSED) demand_empty_rest_of_line (); } +/* Handle the .warn and .nowarn pseudo-ops. */ + +void +s_warn (int set) +{ + flag_no_warnings = !set; +} + /* .weakref x, y sets x as an alias to y that, as long as y is not referenced directly, will cause y to become a weak symbol. */ void diff -urp sources/binutils-2.22/gas/read.h binutils-2.22/gas/read.h --- sources/binutils-2.22/gas/read.h 2009-09-29 16:17:07.000000000 +0200 +++ binutils-2.22/gas/read.h 2012-03-23 16:54:44.000000000 +0100 @@ -188,4 +188,5 @@ extern void s_xstab (int what); extern void s_rva (int); extern void s_incbin (int); extern int s_vendor_attribute (int); +extern void s_warn (int); extern void s_weakref (int);