Solution to Duplicate define

This commit is contained in:
2024-02-03 11:12:24 +05:30
parent 8c34938ee3
commit fcb8c87ca6
4 changed files with 43 additions and 11 deletions

BIN
Header_files/.app.i.swp Normal file

Binary file not shown.

View File

@@ -6,7 +6,7 @@
* Description:
*
* Version: 1.0
* Created: 02/02/24 10:43:11 PM IST
* Created: 03/02/24 10:51:41 AM IST
* Revision: none
* Compiler: gcc
*
@@ -16,9 +16,9 @@
* =====================================================================================
*/
#include "A.h"
#include "B.h"
#define square(x) ( x*x )
#define square(x) (x*x)
int foo(int b);
int foo(int b){
@@ -27,5 +27,6 @@ int foo(int b){
int main(){
int a = square(15);
return 0;
}

View File

@@ -5,16 +5,19 @@
# 0 "<command-line>" 2
# 1 "app.c"
# 19 "app.c"
# 1 "B.h" 1
# 19 "B.h"
# 1 "A.h" 1
# 21 "A.h"
int sum(int a,int b);
# 20 "B.h" 2
int multiply ( int a , int b );
# 22 "A.h"
int sum(int a,int b)
# 20 "app.c" 2
# 1 "B.h" 1
# 21 "B.h"
# 1 "A.h" 1
# 22 "A.h"
int sum(int a,int b)
# 22 "B.h" 2
int multiply(int a,int b)
# 21 "app.c" 2
int foo(int b);
@@ -23,6 +26,7 @@ int foo(int b){
}
int main(){
int a = ( 15*15 );
int a = (15*15);
return 0;
}

27
Header_files/app1.i Normal file
View File

@@ -0,0 +1,27 @@
# 0 "app.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "app.c"
# 19 "app.c"
# 1 "A.h" 1
# 22 "A.h"
int sum(int a,int b)
# 20 "app.c" 2
# 1 "B.h" 1
# 23 "B.h"
int multiply(int a,int b)
# 21 "app.c" 2
int foo(int b);
int foo(int b){
}
int main(){
int a = (15*15);
return 0;
}