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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:39:25+00:00 2026-05-25T15:39:25+00:00

#include<stdio.h> void jigar (int ji) { printf(%d,ji); } void main() { int a=32; (jigar)(a);

  • 0
#include<stdio.h>
void jigar (int ji)
{
    printf("%d",ji);
}
void main()
{
int a=32;
(jigar)(a);
}

When I run this program with the -Wall option, the compiler doesn’t give any warning or error, it works fine. But when I compile this program in MIPS cross-compiler tool chain, then it gives an error:

(jigar)(a);

at this line. Now my question is: why gcc for linux doesn’t point out my silly mistake?

  • 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-05-25T15:39:26+00:00Added an answer on May 25, 2026 at 3:39 pm

    There’s nothing wrong with (jigar)(a); as it is acceptable in standard C. The reason your MIPS compiler gives warning is because perhaps that compiler does not fully implement standard C.

    Edit: Regarding Als’s request for why this is standard C, here’s how:

    Look at the ISO C grammar here: http://www.cs.dartmouth.edu/~mckeeman/cs48/mxcom/doc/notation/c.html and note that a function call

    postfix-expression -> postfix-expression ( )
                        | postfix-expression ( argument-expression-list )
    

    can have postfix-expression as function. There is a rule that says:

    postfix-expression -> primary-expression
    

    where primary-expression could be an identifier, that is function name. However there is also this rule:

    primary-expression -> ( expression )
    

    and if you follow the chain of rules from expression you get back at primary-expression again. Therefore indirectly, you have:

    primary-expression -> ... -> ( primary-expression ) -> ( identifier )
    

    The semantics of C indicates that ( expression ) has the same type and value as expression (1). According to the grammar, (jigar)(a) is correct. Semantically, (jigar) and jigar have the same type and value. Therefore C accepts (jigar)(a) and the functionality is the same as jigar(a).

    Edit 2:

    (1) C99 draft section 6.5.1 article 5:

    A parenthesized expression is a primary expression. Its type and value are identical to those of the unparenthesized expression. It is an lvalue, a function designator, or a void expression if the unparenthesized expression is, respectively, an lvalue, a function designator, or a void expression.

    P.S. anyone knows where I can get the documentation for ISO C, like a list of features or something? I have seen people quote it, but I couldn’t find it myself.

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

Sidebar

Related Questions

#include<stdio.h> void foo(int **arr) { arr[1][1]++; } main() { int arr[20][20]; printf(%d\n,arr[1][1]); foo((int**)arr); printf(%d\n,arr[1][1]);
#include<stdio.h> void function(int); int main() { int x; printf(Enter x:); scanf(%d, &x); function(x); return
#include<stdio.h> #include<conio.h> int main (void) { int a,b,c,d; clrscr(); a=3; b=5; c=a,b; d=(a,b); printf(c=%d,c);
consider the code #include<stdio.h> int main(void) { char* a; scanf(%s,a);//&a and &a[0] give same
#include <stdio.h> void main() { int x=5,y=6; printf(%d%d%d,x++,(y=x++),(x=y++)); } Can anyone please explain why
#include <stdio.h> int main(void){ char x [] = hello world.; printf(%s \n, &x[0]); return
#include<stdio.h> int main(void) { int a=5; printf(%d+1,a); } Output: d. I didn't get how
#include stdio.h #include conio.h int main(void) { if(printf(ABC)) { } else { printf(XYZ); }
Consider this C code: #include stdio.h int main(void) { int count = 5; unsigned
#include <stdio.h> void main(void) { int a; int result; int sum = 0; printf(Enter

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.