Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
94f3cb00
Commit
94f3cb00
authored
7 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
compilers.h: Add definitions for the C11 noreturn keyword.
parent
a5f3e1e6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/nuttx/compiler.h
+12
-6
12 additions, 6 deletions
include/nuttx/compiler.h
with
12 additions
and
6 deletions
include/nuttx/compiler.h
+
12
−
6
View file @
94f3cb00
...
...
@@ -106,9 +106,12 @@
# define weak_const_function
# endif
/* The noreturn attribute informs GCC that the function will not return. */
/* The noreturn attribute informs GCC that the function will not return.
* C11 adds _Noreturn keyword.
*/
# define noreturn_function __attribute__ ((noreturn))
# define noreturn _Noreturn
/* The farcall_function attribute informs GCC that is should use long calls
* (even though -mlong-calls does not appear in the compilation options)
...
...
@@ -279,7 +282,7 @@
/* SDCC-specific definitions ************************************************/
#elif defined(SDCC)
#elif
defined(__SDCC__) ||
defined(SDCC)
/* No I-space access qualifiers */
...
...
@@ -317,13 +320,13 @@
# define weak_const_function
# define restrict
/* REVISIT */
/* Current SDCC supports noreturn (via stdnoreturn.h or _Noreturn) */
/* REVISIT: #define noreturn_function _Noreturn */
/* Current SDCC supports noreturn via C11 _Noreturn keyword */
# define noreturn
_functio
n
# define noreturn
_Noretur
n
/* SDCC does not support the packed attributes */
/* SDCC does not support the
noreturn or
packed attributes */
# define noreturn_function
# define begin_packed_struct
# define end_packed_struct
...
...
@@ -460,6 +463,7 @@
/* The Zilog compiler does not support the noreturn, packed, naked attributes */
# define noreturn_function
# define noreturn
# define begin_packed_struct
# define end_packed_struct
# define naked_function
...
...
@@ -556,6 +560,7 @@
# define weak_function __weak
# define weak_const_function
# define noreturn_function
# define noreturn
# define farcall_function
# define begin_packed_struct __packed
# define end_packed_struct
...
...
@@ -600,6 +605,7 @@
# define weak_const_function
# define restrict
# define noreturn_function
# define noreturn
# define farcall_function
# define begin_packed_struct
# define end_packed_struct
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment