1 msgReturning a reference to local function parameters

typedef name question
\ Michael Gong (22 Jan 2007)
. \ Michael Gong (23 Jan 2007)
. . \ John Love-Jensen (23 Jan 2007)
. . . \ Michael Gong (23 Jan 2007)
. . . . \ John Love-Jensen (23 Jan 2007)
. . . . \ Ian Lance Taylor (23 Jan 2007)
. . . \ Michael Gong (29 Jan 2007)
. . . \ John \(Eljay\) Love-Jensen (29 Jan 2007)
. . . . \ Daniel Lohmann (29 Jan 2007)
. . . . . \ David Fang (31 Jan 2007)

2 msgcc1: out of memory
1 msgbug in fr30 port
1 msgmaking cross compiler soft float by default
5 msgwhen is a double float nearest infinity ?
3 msgYour E-Mail ID Verification
1 msgRE: Requirements for throwing C++ exceptions fr...
2 msgPrinting heap
9 msgCalling conventions used by gcc
2 msg'if (i == n) ++i;' or 'i += i == n;'?
1 msgRe: Getting a tree node for a field of a variable
2 msgSwitching Compilers
3 msga bug for __builtin_offsetof operator ?
3 msgglibc version dependencies
2 msgGCC Cross Compilation Problem
1 msgcompile errors for include sys/socket.h
3 msggcc4.3 configuring problems with mpfr
2 msgmysql-library
2 msg'Preprocess' dwarf info?
Subject:typedef name question
Group:Gcc-help
From:Michael Gong
Date:22 Jan 2007


Hi, gcc developers,

I have 2 following programs, and both are compiled fine by gcc:

/* t1.c */
typedef int myint;
int foo() {
int myint;
myint * myint; /* an expression: variable "myint" * "myint" */
}

/* t2.c */
typedef int myint;
int foo() {
myint * myint; /* a declaration for pointer variable "myint" */
}

As you can see, the "myint * myint" could have different interperation
depending on previous declarations. I am wondering how gcc distinguish
them ? Is it done during parsing step or during semantic checking step ?

Thanks.

Mike



© 2004-2008 readlist.com