Thread: What is this constant?

  1. #1
    programmer hacker DevZero's Avatar
    Join Date
    Jul 2017

    What is this constant?

    I looked in the Include stdlib.h and I saw there such code:
    extern int system (const char *__command) __wur;
    I'm interested in; __wur.
    I searched on the Internet and on includes but did not find anything, what is it?

  2. #2
    Registered User
    Join Date
    May 2009
    Something internal to the compiler or library implementation.

    If you really wish to know find a site that supports your compiler and ask there.
    Or, at least post your compiler information in this thread and maybe someone will be able to answer the question.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    programmer hacker DevZero's Avatar
    Join Date
    Jul 2017


    My gcc: 4.9.2-10 gnueabihf

  4. #4
    Registered User
    Join Date
    Jun 2015
    It tells the compiler to warn about an unused result.

  5. #5
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    New York, NY
    re: __wur

    From a Bug Report:
    Unfortunately glibc marks fwrite --- but oddly not the other stdio
    output functions --- with __wur (which expands to
    __attribute__((__warn_unused_result__)) when optimization is enabled
    and the _FORTIFY_SOURCE feature is in use).
    From the GNU Website:
    The warn_unused_result attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is useful for functions where not checking the result is either a security problem or always a bug, such as realloc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Character arrays - constant values in a constant expression
    By hewlettuser in forum C++ Programming
    Replies: 2
    Last Post: 04-07-2017, 04:00 AM
  2. Replies: 3
    Last Post: 05-17-2016, 06:35 AM
  3. Constant
    By UserName112 in forum C++ Programming
    Replies: 12
    Last Post: 10-08-2011, 10:06 AM
  4. Why make a constant a constant again?
    By Overworked_PhD in forum C Programming
    Replies: 3
    Last Post: 11-03-2007, 06:57 PM
  5. Constant pointer to constant value
    By tretton in forum C Programming
    Replies: 10
    Last Post: 12-23-2005, 01:45 PM

Tags for this Thread