Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8698817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:48:19+00:00 2026-06-13T01:48:19+00:00

While looking at the Linux kernel, I noticed the line: static void *malloc(size_t size)

  • 0

While looking at the Linux kernel, I noticed the line:

static void *malloc(size_t size) __maybe_unused;

in Linux v3.2 /arch/frv/kernel/gdb_stub.c . I’ve never seen __maybe_unused used before. Is it specific to the Linux kernel? Or is it defined in the C spec? And what exactly does it do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:48:20+00:00Added an answer on June 13, 2026 at 1:48 am

    In include/linux/compiler-gcc.h there is the definition of the __maybe_unused macro:

    #define __maybe_unused  __attribute__((unused))
    

    and in gcc manual you have the documentation of the unused attribute for functions:

    unused “This attribute, attached to a function, means that the function is meant to be possibly unused. GCC will not produce a warning for this function.”

    http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

    and for variables:

    unused “This attribute, attached to a variable, means that the variable is meant to be possibly unused. GCC will not produce a warning for this variable.”

    http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While looking at Linux kernel's implementation of doubly linked circular lists, I've found following
While looking for ways to find the size of a file given a FILE*
I am looking into options for command line video processing tools for Linux, but
I'm looking for a cmd line base diff editor to be used in Linux.
while looking at some code I stumbled onto: throw /*-->*/new std::exception (//... and I
While looking through some old code I came across this gem: MyObject o =
While looking into parallel programming, and subsequently evaluation strategies, the question whether thunks are
While looking up the answer to this question: Why is an out parameter not
While looking for a way to temporarily save the search results when a user
While looking at some conceptual questions in C,I came across this question in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.