This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/OBVIOUS?] ui_file_new function missing "extern" in header.


On Tue, 18 Dec 2012 09:35:39 +0100, Pierre Muller wrote:
>   i.e. shouldn't all functions declared in headers
> have the extern modifier?
>   Is this mandatory?
>   It doesn't see to change anything in practice, but to me,
> it seems like good practice...

I agree, it does not change anything.  I agree it is probably GNU Coding
Standards do not talk about it so it could be added to gdb/doc/gdbint.texinfo
"Coding Standards".

I am OK with such kind of changes as obvious ones after updating
gdbint.texinfo.


> @@ -135,7 +135,7 @@ extern struct ui_file *gdb_fopen (char *
>  /* Create a file which writes to both ONE and TWO.  CLOSE_ONE
>     and CLOSE_TWO indicate whether the original files should be
>     closed when the new file is closed.  */
> -struct ui_file *tee_file_new (struct ui_file *one,
> +extern struct ui_file *tee_file_new (struct ui_file *one,
>                               int close_one,
>                               struct ui_file *two,
>                               int close_two);

But in this case you need to reformat the parameters "clone_one" and remaining
ones to still align properly under the opening paren.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]