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 8858427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:49:36+00:00 2026-06-14T14:49:36+00:00

#define ext4_debug(f, a…) \ do { \ printk(KERN_DEBUG EXT4-fs DEBUG (%s, %d): %s:, \

  • 0
#define ext4_debug(f, a...)                     \
    do {                                \
        printk(KERN_DEBUG "EXT4-fs DEBUG (%s, %d): %s:",    \
            __FILE__, __LINE__, __func__);          \
        printk(KERN_DEBUG f, ## a);             \
    } while (0)

what I dont understand is this

printk(KERN_DEBUG f, ## a); 

Could anybody help me to understand what is ## in this line?
thank you

  • 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-14T14:49:37+00:00Added an answer on June 14, 2026 at 2:49 pm

    It is there to make the variadic macro (macro which can take multiple arguments) work if you pass in 0 arguments.

    From the Variadic Macros section in the GCC manual:

    Second, the ## token paste operator has a special meaning when placed between a comma and a variable argument. If you write

    #define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__)
    

    and the variable argument is left out when the eprintf macro is used, then the comma before the ## will be deleted. This does not happen if you pass an empty argument, nor does it happen if the token preceding ## is anything other than a comma.

    eprintf ("success!\n")
         ==> fprintf(stderr, "success!\n");
    

    If you did not use this, then that would expand to frpintf(stderr, "success!\n",), which is a syntax error.

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

Sidebar

Related Questions

#define cimg_use_jpeg 2 #ifndef cimg_use_jpeg //code goes here #endif I really don't understand...
#define offsetof(type, member) ((size_t)(&((type *)0)->member)) I am not understanding (&((type *)0)->member) what is this
#define BLAH word cout << BLAH; Is there any way to do this?
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, native-activity, __VA_ARGS__)) #define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, native-activity, __VA_ARGS__)) This is definition for
define_method could be used to define methods: define_method(:m) do |a| end which is equivalent
#define MyLog(msg...) MyLogWith(__func__,##msg); MyLog(@I do not know...); What do ... and ## mean in
#define TYPE_CHECK(T, S) \ while (false) { \ *(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \ }
#define BUF_SIZE 10 char *html = foo:baa\r\nxxx:yyyy:\r\nLocation:........................................\r\Connection:close\r\n\r\n; char *p = (char*)html, *buf, *pbuf, *tbuf;
(define (lcs lst1 lst2) (define (except-last-pair list) (if (pair? (cdr list)) (cons (car list)
#define MAX 100 struct bs{ int ab; int ac; }be; struct s{ be b;

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.