aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozefl@gcc.gnu.org>2018-12-29 19:00:48 +0000
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>2018-12-29 19:00:48 +0000
commit600845521e68b5e0da136636ecf174eee8e5ee17 (patch)
tree4ef6cf8d348615502582a0545e6f652557e462c0 /gcc/doc
parent74ee24e23e96dde8a338a140c3cadd0bb7715e61 (diff)
downloadgcc-600845521e68b5e0da136636ecf174eee8e5ee17.zip
gcc-600845521e68b5e0da136636ecf174eee8e5ee17.tar.gz
gcc-600845521e68b5e0da136636ecf174eee8e5ee17.tar.bz2
msp430.c (msp430_attr): Warn when the critical and interrupt function attributes are used together.
2018-12-29 Jozef Lawrynowicz <jozef.l@mittosystems.com> gcc/ChangeLog: * config/msp430/msp430.c (msp430_attr): Warn when the critical and interrupt function attributes are used together. * gcc/doc/extend.texi: Update documentation on the critical attribute. gcc/testsuite/ChangeLog: * gcc.target/msp430/critical-interrupt.c: New test. From-SVN: r267467
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 1849120..27724e4 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -4978,8 +4978,12 @@ These function attributes are supported by the MSP430 back end:
@cindex @code{critical} function attribute, MSP430
Critical functions disable interrupts upon entry and restore the
previous interrupt state upon exit. Critical functions cannot also
-have the @code{naked} or @code{reentrant} attributes. They can have
-the @code{interrupt} attribute.
+have the @code{naked}, @code{reentrant} or @code{interrupt} attributes.
+
+The MSP430 hardware ensures that interrupts are disabled on entry to
+@code{interrupt} functions, and restores the previous interrupt state
+on exit. The @code{critical} attribute is therefore redundant on
+@code{interrupt} functions.
@item interrupt
@cindex @code{interrupt} function attribute, MSP430