lkml.org 
[lkml]   [2005]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [i2c]: Fix some gcc 4.0 compile failures and warnings
On Wed, 23 Feb 2005, Mickey Stein wrote:

> From: Mickey Stein
> Versions: linux-2.6.11-rc4-bk11, gcc4 (GCC) 4.0.0 20050217 (latest fc
> rawhide from 19Feb DL)
>
> gcc 4.0.x cvs seems to dislike "include/linux/i2c.h file" and others due to a
> current gcc 4.0.x change having to do with
> array declarations.
>
> Example error msg: include/linux/i2c.h:{55,194} error: array type has
> incomplete element type
>
> A. Daplas has recently done a workaround for this on another header file. A
> thread discussing this
> can be found by following the link below:
>
> http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html
>

Do you know if the new compiler will compile....

int main(int argc, char *argv[]){}

?????

... or would one have to change every F* file in the world
to be:

int main(int argc, char **argv){};

... which is wrong because it's truly a pointer to an
array of strings.

If so, the compiler is broken. Also, in the cited link, if
anybody at GNU bothered to read the Response from the
Committee on the cited defect report, they said; "No constraint
are violated, therefore no diagnostics are required"......

We shouldn't "fix" the kernel for broken compilers.

I attached a `grep` of GNU's own C-header files. I
guess they expect us to change all those too, no?
aio.h:extern int aio_suspend (__const struct aiocb *__const __list[], int __nent,
aio.h: (__const struct aiocb *__const __list[],
aio.h:extern int aio_suspend64 (__const struct aiocb64 *__const __list[], int __nent,
argz.h:extern error_t __argz_create (char *__const __argv[], char **__restrict __argz,
argz.h:extern error_t argz_create (char *__const __argv[], char **__restrict __argz,
audiofile.h:void afInitLoopIDs (AFfilesetup, int instid, int ids[], int nids);
audiofile.h:int afGetLoopIDs (AFfilehandle, int instid, int loopids[]);
audiofile.h:int afGetMarkIDs (AFfilehandle file, int trackid, int markids[]);
baudboy.h:static inline int _doit(const char * argv[])
baudboy.h: const char * argv[] = { LOCKDEV_PATH, "-l", NULL, NULL};
baudboy.h: const char * argv[] = { LOCKDEV_PATH, "-u", NULL, NULL};
baudboy.h: const char * argv[] = { LOCKDEV_PATH, NULL, NULL};
colorname.h:pm_parse_dictionary_name(const char colorname[], long const lmaxval,
curses.h:extern NCURSES_EXPORT_VAR(chtype) acs_map[];
curses.h:extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compatibility */
db_cxx.h: DB_LOCKREQ list[], int nlist, DB_LOCKREQ **elistp);
db_cxx.h: virtual int log_archive(char **list[], u_int32_t flags);
db.h: int (*log_archive) __P((DB_ENV *, char **[], u_int32_t));
dejagnu.h:const char *outstate_list[] = {
expect.h:EXTERN int exp_spawnv _ANSI_ARGS_((char *file, char *argv[]));
fam.h:extern char *FamErrlist[];
ghttp_constants.h:extern const char http_hdr_Allow[];
ghttp_constants.h:extern const char http_hdr_Content_Encoding[];
ghttp_constants.h:extern const char http_hdr_Content_Language[];
ghttp_constants.h:extern const char http_hdr_Content_Length[];
ghttp_constants.h:extern const char http_hdr_Content_Location[];
ghttp_constants.h:extern const char http_hdr_Content_MD5[];
ghttp_constants.h:extern const char http_hdr_Content_Range[];
ghttp_constants.h:extern const char http_hdr_Content_Type[];
ghttp_constants.h:extern const char http_hdr_Expires[];
ghttp_constants.h:extern const char http_hdr_Last_Modified[];
ghttp_constants.h:extern const char http_hdr_Cache_Control[];
ghttp_constants.h:extern const char http_hdr_Connection[];
ghttp_constants.h:extern const char http_hdr_Date[];
ghttp_constants.h:extern const char http_hdr_Pragma[];
ghttp_constants.h:extern const char http_hdr_Transfer_Encoding[];
ghttp_constants.h:extern const char http_hdr_Update[];
ghttp_constants.h:extern const char http_hdr_Trailer[];
ghttp_constants.h:extern const char http_hdr_Via[];
ghttp_constants.h:extern const char http_hdr_Accept[];
ghttp_constants.h:extern const char http_hdr_Accept_Charset[];
ghttp_constants.h:extern const char http_hdr_Accept_Encoding[];
ghttp_constants.h:extern const char http_hdr_Accept_Language[];
ghttp_constants.h:extern const char http_hdr_Authorization[];
ghttp_constants.h:extern const char http_hdr_Expect[];
ghttp_constants.h:extern const char http_hdr_From[];
ghttp_constants.h:extern const char http_hdr_Host[];
ghttp_constants.h:extern const char http_hdr_If_Modified_Since[];
ghttp_constants.h:extern const char http_hdr_If_Match[];
ghttp_constants.h:extern const char http_hdr_If_None_Match[];
ghttp_constants.h:extern const char http_hdr_If_Range[];
ghttp_constants.h:extern const char http_hdr_If_Unmodified_Since[];
ghttp_constants.h:extern const char http_hdr_Max_Forwards[];
ghttp_constants.h:extern const char http_hdr_Proxy_Authorization[];
ghttp_constants.h:extern const char http_hdr_Range[];
ghttp_constants.h:extern const char http_hdr_Referrer[];
ghttp_constants.h:extern const char http_hdr_TE[];
ghttp_constants.h:extern const char http_hdr_User_Agent[];
ghttp_constants.h:extern const char http_hdr_Accept_Ranges[];
ghttp_constants.h:extern const char http_hdr_Age[];
ghttp_constants.h:extern const char http_hdr_ETag[];
ghttp_constants.h:extern const char http_hdr_Location[];
ghttp_constants.h:extern const char http_hdr_Retry_After[];
ghttp_constants.h:extern const char http_hdr_Server[];
ghttp_constants.h:extern const char http_hdr_Vary[];
ghttp_constants.h:extern const char http_hdr_Warning[];
ghttp_constants.h:extern const char http_hdr_WWW_Authenticate[];
ghttp_constants.h:extern const char http_hdr_Set_Cookie[];
ghttp_constants.h:extern const char http_hdr_DAV[];
ghttp_constants.h:extern const char http_hdr_Depth[];
ghttp_constants.h:extern const char http_hdr_Destination[];
ghttp_constants.h:extern const char http_hdr_If[];
ghttp_constants.h:extern const char http_hdr_Lock_Token[];
ghttp_constants.h:extern const char http_hdr_Overwrite[];
ghttp_constants.h:extern const char http_hdr_Status_URI[];
ghttp_constants.h:extern const char http_hdr_Timeout[];
gif_lib.h: GifPixelType ColorTransIn2[]);
gif_lib.h:extern void ApplyTranslation(SavedImage *Image, GifPixelType Translation[]);
gif_lib.h:extern int AddExtensionBlock(SavedImage *New, int Len, char ExtData[]);
gif_lib.h:extern unsigned char AsciiTable[][GIF_FONT_WIDTH];
gpm.h:extern unsigned char _gpm_buf[];
hfs.h:extern const unsigned char hfs_charorder[];
hfs.h: const char *, unsigned int, const unsigned long []);
iwlib.h: char * args[],
iwlib.h: char * args[],
iwlib.h:extern const char * const iw_operation_mode[];
jpeglib.h: int component_index; /* its index in SOF or cinfo->comp_info[] */
jpeglib.h: int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
jpeglib.h: unsigned int data_length; /* # bytes of data saved at data[] */
k3bdevice.h: static const char* cdrdao_drivers[];
krb5.h: krb5_prompt prompts[]);
krb5.h: krb5_prompt prompts[]);
libaio.h:extern int io_submit(io_context_t ctx, long nr, struct iocb *ios[]);
libesmtp.h:char *smtp_strerror (int error, char buf[], size_t buflen);
link.h:extern ElfW(Dyn) _DYNAMIC[];
ltdl.h: extern const lt_dlsymlist lt_preloaded_symbols[]; \
mpi.h:extern int MPI_Group_range_excl __ARGS((MPI_Group, int, int [][3],
mpi.h:extern int MPI_Group_range_incl __ARGS((MPI_Group, int, int [][3],
mpi.h:extern int PMPI_Group_range_excl __ARGS((MPI_Group, int, int [][3],
mpi.h:extern int PMPI_Group_range_incl __ARGS((MPI_Group, int, int [][3],
ncurses.h:extern NCURSES_EXPORT_VAR(chtype) acs_map[];
ncurses.h:extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compatibility */
netdb.h:extern int gai_suspend (__const struct gaicb *__const __list[], int __ent,
pbmfont.h:int mk_argvn ARGS(( char* s, char* vec[], int max ));
pbm.h:void pbm_init ARGS(( int* argcP, char* argv[] ));
pgm.h:void pgm_init ARGS(( int* argcP, char* argv[] ));
pgtypes_numeric.h: int ndigits; /* number of digits in digits[] - can be
pgtypes_numeric.h: NumericDigit *buf; /* start of alloc'd space for digits[] */
pgtypes_numeric.h: int ndigits; /* number of digits in digits[] - can be
pi-datebook.h: extern char *DatebookAlarmTypeNames[];
pi-datebook.h: extern char *DatebookRepeatTypeNames[];
pi-datebook.hxx: delete [] _description;
pi-datebook.hxx: delete [] _note;
pi-dlp.h: extern char *dlp_errorlist[];
pi-expense.h: extern char *ExpenseSortNames[];
pi-expense.h: extern char *ExpenseDistanceNames[];
pi-expense.h: extern char *ExpensePaymentNames[];
pi-expense.h: extern char *ExpenseTypeNames[];
pi-mail.h: extern char *MailSyncTypeNames[];
pi-mail.h: extern char *MailSortTypeNames[];
pm.h:pm_proginit(int* const argcP, char* argv[]);
pm.h:pm_message (const char format[], ...);
pm.h:pm_error (const char reason[], ...);
pm.h:pm_perror (const char reason[]);
pm.h:pm_usage (const char usage[]);
pm.h:pm_openr_seekable(const char name[]);
pm.h:pm_arg0toprogname(const char arg0[]);
pnm.h:void pnm_init ARGS(( int* argcP, char* argv[] ));
popt.h:extern struct poptOption poptAliasOptions[];
popt.h:extern struct poptOption poptHelpOptions[];
ppm.h:void ppm_init ARGS(( int* argcP, char* argv[] ));
recodext.h:extern const recode_ucs2 ucs2_data_pool[];
resolv.h: unsigned nsort:4; /* number of elements in sort_list[] */
shhopt.h:void optParseOptions(int *argc, char *argv[],
shhopt.h: optStruct opt[], int allowNegNum);
shhopt.h:optParseOptions2(int * const argc_p, char *argv[], const optStruct2 opt,
shhopt.h:optParseOptions3(int * const argc_p, char *argv[], const optStruct3 opt,
spawn.h: char *__const argv[], char *__const envp[]);
stdlib.h:extern int getloadavg (double __loadavg[], int __nelem) __THROW;
tcldbg.h:EXTERN char **Dbg_ArgcArgv _ANSI_ARGS_((int argc,char *argv[],
tclDecls.h: Tcl_Obj *CONST objv[]));
tclDecls.h: int objc, Tcl_Obj *CONST objv[]));
tclDecls.h: Tcl_Obj *CONST objv[]));
tclDecls.h: int objc, Tcl_Obj *CONST objv[]));
tclDecls.h: Tcl_Obj *CONST objv[]));
tclDecls.h: int objc, Tcl_Obj *CONST objv[],
tclDecls.h: int objc, Tcl_Obj *CONST objv[], int flags));
tclDecls.h: Tcl_Obj *CONST objv[]));
tclDecls.h: int objc, Tcl_Obj *CONST objv[]));
tclDecls.h: Tcl_Obj * (*tcl_ConcatObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[])); /* 17 */
tclDecls.h: int (*tcl_ListObjReplace) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[])); /* 48 */
tclDecls.h: Tcl_Obj * (*tcl_NewListObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[])); /* 53 */
tclDecls.h: void (*tcl_SetListObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[])); /* 62 */
tclDecls.h: int (*tcl_CreateAliasObj) _ANSI_ARGS_((Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[])); /* 87 */
tclDecls.h: void (*tcl_WrongNumArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message)); /* 264 */
tclDecls.h: int (*tcl_EvalObjv) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags)); /* 292 */
tclDecls.h: int (*tcl_ProcObjCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 390 */
tclDecls.h: Tcl_Obj* (*tcl_FSJoinToPath) _ANSI_ARGS_((Tcl_Obj * basePtr, int objc, Tcl_Obj *CONST objv[])); /* 464 */
tcl.h: Tcl_Interp *interp, int argc, CONST84 char *argv[]));
tcl.h: ClientData cmdClientData, int argc, CONST84 char *argv[]));
tcpd.h:extern char unknown[];
tcpd.h:extern char paranoid[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
term.h:extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
term.h:extern NCURSES_EXPORT_VAR(char) ttytype[];
tkDecls.h: int objc, Tcl_Obj *CONST objv[],
tkDecls.h: int objc, Tcl_Obj *CONST objv[],
tkDecls.h: int (*tk_GetScrollInfoObj) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], double * dblPtr, int * intPtr)); /* 210 */
tkDecls.h: int (*tk_SetOptions) _ANSI_ARGS_((Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, int objc, Tcl_Obj *CONST objv[], Tk_Window tkwin, Tk_SavedOptions * savePtr, int * maskPtr)); /* 214 */
tk.h: XPoint xPoints[], double dblPoints[]));
tk.h: Tcl_Obj *CONST objv[]));
tk.h: Tcl_Obj *CONST objv[], int flags));
tk.h: Tcl_Obj *CONST argv[]));
tk.h: char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr,
unistd.h:extern int execve (__const char *__path, char *__const __argv[],
unistd.h: char *__const __envp[]) __THROW;
unistd.h:extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
unistd.h:extern int execv (__const char *__path, char *__const __argv[]) __THROW;
unistd.h:extern int execvp (__const char *__file, char *__const __argv[]) __THROW;
unistd.h:extern int getgroups (int __size, __gid_t __list[]) __THROW;
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.056 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site