Redeclaration of used symbols

Gabriel Dos Reis gdr@integrable-solutions.net
Sun Sep 7 17:44:00 GMT 2003


Jan Hubicka <jh@suse.cz> writes:
| Hard error sounds like most plausible sollution to me as well, however
| duplicate_decls is a black magic for me, what code you do have in mind?

duplicate_decls should be broken in logical units one day...

| In general it would be nice if we can avoid changing the declarations
| of functions and variables once they have been defined...

Yep.  You need to be careful about

  static inline int max(int a, int b) { return b > a ? a : b; }

  // ...
  
  void f(int a, int b)
  {
     extern int min(int, int);  // common practice in C

     int j = min(a, b);
  }

-- Gaby



More information about the Gcc mailing list