You are not logged in.

#1 2018-06-20 21:35:51

sashkent3
Member
Registered: 2018-06-20
Posts: 7

[SOLVED] My C compiler is broken

Hello everyone!

My problem is generally described in the subject. This is my test.c file:

#include<stdio.h>
main()
{
printf("hello C is working");
}

When I try:

cc test.c

I get:

In file included from /usr/local/include/crtdefs.h:10,
                 from /usr/local/include/stdio.h:9,
                 from test.c:1:
/usr/local/include/_mingw.h:264:2: error: #error Only Win32 target is supported!
 #error Only Win32 target is supported!
  ^~~~~
In file included from /usr/local/include/crtdefs.h:10,
                 from /usr/local/include/stdio.h:9,
                 from test.c:1:
/usr/local/include/_mingw.h:539:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__debugbreak’
 void __cdecl __debugbreak(void);
              ^~~~~~~~~~~~
/usr/local/include/_mingw.h:540:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__debugbreak’
 __MINGW_INTRIN_INLINE void __cdecl __debugbreak(void)
                                    ^~~~~~~~~~~~
In file included from test.c:1:
/usr/local/include/stdio.h:141:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_sscanf’
   int __cdecl __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:144:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vsscanf’
   int __cdecl __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:147:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_scanf’
   int __cdecl __mingw_scanf(const char * __restrict__ _Format,...);
               ^~~~~~~~~~~~~
/usr/local/include/stdio.h:150:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vscanf’
   int __cdecl __mingw_vscanf(const char * __restrict__ Format, va_list argp);
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:153:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_fscanf’
   int __cdecl __mingw_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:156:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vfscanf’
   int __cdecl __mingw_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:160:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vsnprintf’
   int __cdecl __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format,
               ^~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:164:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_snprintf’
   int __cdecl __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__  format, ...);
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:167:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_printf’
   int __cdecl __mingw_printf(const char * __restrict__ , ... ) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:170:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vprintf’
   int __cdecl __mingw_vprintf (const char * __restrict__ , va_list) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:173:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_fprintf’
   int __cdecl __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:176:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vfprintf’
   int __cdecl __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:179:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_sprintf’
   int __cdecl __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:182:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vsprintf’
   int __cdecl __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:185:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_asprintf’
   int __cdecl __mingw_asprintf(char ** __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:188:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vasprintf’
   int __cdecl __mingw_vasprintf(char ** __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
               ^~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:378:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fprintf’
   int __cdecl fprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
               ^~~~~~~
/usr/local/include/stdio.h:380:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘printf’
   int __cdecl printf(const char * __restrict__ _Format,...);
               ^~~~~~
/usr/local/include/stdio.h:382:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sprintf’
   int __cdecl sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~~
/usr/local/include/stdio.h:385:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vfprintf’
   int __cdecl vfprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,va_list _ArgList);
               ^~~~~~~~
/usr/local/include/stdio.h:387:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vprintf’
   int __cdecl vprintf(const char * __restrict__ _Format,va_list _ArgList);
               ^~~~~~~
/usr/local/include/stdio.h:389:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vsprintf’
   int __cdecl vsprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~~~
In file included from test.c:1:
/usr/local/include/stdio.h:392:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fscanf’
   int __cdecl fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~
/usr/local/include/stdio.h:394:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scanf’
   int __cdecl scanf(const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~
/usr/local/include/stdio.h:396:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sscanf’
   int __cdecl sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~
/usr/local/include/stdio.h:403:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vscanf’
   int __cdecl __ms_vscanf(const char * __restrict__ Format, va_list argp);
               ^~~~~~~~~~~
/usr/local/include/stdio.h:405:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vfscanf’
   int __cdecl __ms_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp);
               ^~~~~~~~~~~~
/usr/local/include/stdio.h:407:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vsscanf’
   int __cdecl __ms_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp);
               ^~~~~~~~~~~~
/usr/local/include/stdio.h:411:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vfscanf (FILE *__stream,  const char *__format, __builtin_va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:418:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vsscanf (const char * __restrict__ __source, const char * __restrict__ __format, __builtin_va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:424:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vscanf(const char *__format,  __builtin_va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:432:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_filbuf’
   _CRTIMP int __cdecl _filbuf(FILE *_File);
                       ^~~~~~~
/usr/local/include/stdio.h:433:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_flsbuf’
   _CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File);
                       ^~~~~~~
/usr/local/include/stdio.h:437:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fsopen’
   _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
                         ^~~~~~~
/usr/local/include/stdio.h:439:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘clearerr’
   void __cdecl clearerr(FILE *_File);
                ^~~~~~~~
/usr/local/include/stdio.h:440:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fclose’
   int __cdecl fclose(FILE *_File);
               ^~~~~~
/usr/local/include/stdio.h:441:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fcloseall’
   _CRTIMP int __cdecl _fcloseall(void);
                       ^~~~~~~~~~
/usr/local/include/stdio.h:445:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fdopen’
   _CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode);
                         ^~~~~~~
/usr/local/include/stdio.h:447:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘feof’
   int __cdecl feof(FILE *_File);
               ^~~~
/usr/local/include/stdio.h:448:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ferror’
   int __cdecl ferror(FILE *_File);
               ^~~~~~
/usr/local/include/stdio.h:449:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fflush’
   int __cdecl fflush(FILE *_File);
               ^~~~~~
/usr/local/include/stdio.h:450:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgetc’
   int __cdecl fgetc(FILE *_File);
               ^~~~~
/usr/local/include/stdio.h:451:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fgetchar’
   _CRTIMP int __cdecl _fgetchar(void);
                       ^~~~~~~~~
/usr/local/include/stdio.h:452:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgetpos’
   int __cdecl fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); /* 64bit only, no 32bit version */
               ^~~~~~~
/usr/local/include/stdio.h:453:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgetpos64’
   int __cdecl fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); /* fgetpos already 64bit */
               ^~~~~~~~~
/usr/local/include/stdio.h:454:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgets’
   char *__cdecl fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File);
                 ^~~~~
/usr/local/include/stdio.h:455:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fileno’
   _CRTIMP int __cdecl _fileno(FILE *_File);
                       ^~~~~~~
/usr/local/include/stdio.h:459:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_tempnam’
   _CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix);
                         ^~~~~~~~
/usr/local/include/stdio.h:460:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_flushall’
   _CRTIMP int __cdecl _flushall(void);
                       ^~~~~~~~~
/usr/local/include/stdio.h:461:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fopen’
   FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                 ^~~~~
/usr/local/include/stdio.h:463:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fputc’
   int __cdecl fputc(int _Ch,FILE *_File);
               ^~~~~
/usr/local/include/stdio.h:464:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fputchar’
   _CRTIMP int __cdecl _fputchar(int _Ch);
                       ^~~~~~~~~
/usr/local/include/stdio.h:465:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fputs’
   int __cdecl fputs(const char * __restrict__ _Str,FILE * __restrict__ _File);
               ^~~~~
/usr/local/include/stdio.h:466:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fread’
   size_t __cdecl fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File);
                  ^~~~~
/usr/local/include/stdio.h:467:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘freopen’
   FILE *__cdecl freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                 ^~~~~~~
/usr/local/include/stdio.h:468:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fsetpos’
   int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
               ^~~~~~~
/usr/local/include/stdio.h:469:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fsetpos64’
   int __cdecl fsetpos64(FILE *_File,const fpos_t *_Pos); /* fsetpos already 64bit */
               ^~~~~~~~~
/usr/local/include/stdio.h:470:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fseek’
   int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
               ^~~~~
/usr/local/include/stdio.h:484:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ftell’
   long __cdecl ftell(FILE *_File);
                ^~~~~
/usr/local/include/stdio.h:496:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fseeki64’
   __MINGW_EXTENSION int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
                                 ^~~~~~~~~
/usr/local/include/stdio.h:497:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_ftelli64’
   __MINGW_EXTENSION __int64 __cdecl _ftelli64(FILE *_File);
                                     ^~~~~~~~~
/usr/local/include/stdio.h:498:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwrite’
   size_t __cdecl fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File);
                  ^~~~~~
/usr/local/include/stdio.h:499:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getc’
   int __cdecl getc(FILE *_File);
               ^~~~
/usr/local/include/stdio.h:500:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getchar’
   int __cdecl getchar(void);
               ^~~~~~~
/usr/local/include/stdio.h:501:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_getmaxstdio’
   _CRTIMP int __cdecl _getmaxstdio(void);
                       ^~~~~~~~~~~~
/usr/local/include/stdio.h:502:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gets’
   char *__cdecl gets(char *_Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                 ^~~~
/usr/local/include/stdio.h:503:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_getw’
   int __cdecl _getw(FILE *_File);
               ^~~~~
/usr/local/include/stdio.h:506:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘perror’
   void __cdecl perror(const char *_ErrMsg);
                ^~~~~~
/usr/local/include/stdio.h:508:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_pclose’
   _CRTIMP int __cdecl _pclose(FILE *_File);
                       ^~~~~~~
/usr/local/include/stdio.h:509:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_popen’
   _CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode);
                         ^~~~~~
/usr/local/include/stdio.h:514:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putc’
   int __cdecl putc(int _Ch,FILE *_File);
               ^~~~
/usr/local/include/stdio.h:515:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putchar’
   int __cdecl putchar(int _Ch);
               ^~~~~~~
/usr/local/include/stdio.h:516:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘puts’
   int __cdecl puts(const char *_Str);
               ^~~~
/usr/local/include/stdio.h:517:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_putw’
   _CRTIMP int __cdecl _putw(int _Word,FILE *_File);
                       ^~~~~
/usr/local/include/stdio.h:520:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’
   int __cdecl remove(const char *_Filename);
               ^~~~~~
/usr/local/include/stdio.h:521:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rename’
   int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
               ^~~~~~
/usr/local/include/stdio.h:522:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_unlink’
   _CRTIMP int __cdecl _unlink(const char *_Filename);
                       ^~~~~~~
/usr/local/include/stdio.h:524:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unlink’
   int __cdecl unlink(const char *_Filename) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~~
/usr/local/include/stdio.h:527:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rewind’
   void __cdecl rewind(FILE *_File);
                ^~~~~~
/usr/local/include/stdio.h:528:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_rmtmp’
   _CRTIMP int __cdecl _rmtmp(void);
                       ^~~~~~
/usr/local/include/stdio.h:529:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setbuf’
   void __cdecl setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                ^~~~~~
/usr/local/include/stdio.h:530:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_setmaxstdio’
   _CRTIMP int __cdecl _setmaxstdio(int _Max);
                       ^~~~~~~~~~~~
/usr/local/include/stdio.h:531:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_set_output_format’
   _CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
                                ^~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:532:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_get_output_format’
   _CRTIMP unsigned int __cdecl _get_output_format(void);
                                ^~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:533:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setvbuf’
   int __cdecl setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size);
               ^~~~~~~
/usr/local/include/stdio.h:534:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_scprintf’
   _CRTIMP int __cdecl _scprintf(const char * __restrict__ _Format,...);
                       ^~~~~~~~~
/usr/local/include/stdio.h:535:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_snscanf’
   _CRTIMP int __cdecl _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                       ^~~~~~~~
/usr/local/include/stdio.h:536:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘tmpfile’
   FILE *__cdecl tmpfile(void) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                 ^~~~~~~
/usr/local/include/stdio.h:537:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘tmpnam’
   char *__cdecl tmpnam(char *_Buffer);
                 ^~~~~~
/usr/local/include/stdio.h:538:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ungetc’
   int __cdecl ungetc(int _Ch,FILE *_File);
               ^~~~~~
/usr/local/include/stdio.h:541:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_snprintf’
   _CRTIMP int __cdecl _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                       ^~~~~~~~~
/usr/local/include/stdio.h:543:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_vsnprintf’
   _CRTIMP int __cdecl _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                       ^~~~~~~~~~
/usr/local/include/stdio.h:553:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vsnprintf’
   int __cdecl __ms_vsnprintf(char * __restrict__ d,size_t n,const char * __restrict__ format,va_list arg)
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:558:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vsnprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:564:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_snprintf’
   int __cdecl __ms_snprintf(char * __restrict__ s, size_t n, const char * __restrict__  format, ...);
               ^~~~~~~~~~~~~
/usr/local/include/stdio.h:569:1: error: expected ‘,’ or ‘;’ before ‘int’
 int snprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, ...)
 ^~~
/usr/local/include/stdio.h:583:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_vscprintf’
   _CRTIMP int __cdecl _vscprintf(const char * __restrict__ _Format,va_list _ArgList);
                       ^~~~~~~~~~
/usr/local/include/stdio.h:584:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_set_printf_count_output’
   _CRTIMP int __cdecl _set_printf_count_output(int _Value);
                       ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:585:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_get_printf_count_output’
   _CRTIMP int __cdecl _get_printf_count_output(void);
                       ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:591:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_swscanf’
   int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:593:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vswscanf’
   int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp);
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:595:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_wscanf’
   int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:597:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vwscanf’
   int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:599:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_fwscanf’
   int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:601:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vfwscanf’
   int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp);
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:604:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_fwprintf’
   int __cdecl __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:606:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_wprintf’
   int __cdecl __mingw_wprintf(const wchar_t * __restrict__ _Format,...);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:608:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vfwprintf’
   int __cdecl __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
               ^~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:610:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vwprintf’
   int __cdecl __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:612:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_snwprintf’
   int __cdecl __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
               ^~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:614:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vsnwprintf’
   int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list);
               ^~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:616:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_swprintf’
   int __cdecl __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...);
               ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:618:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vswprintf’
   int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list);
               ^~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:741:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwscanf’
   int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~~
/usr/local/include/stdio.h:742:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘swscanf’
   int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~~
/usr/local/include/stdio.h:743:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wscanf’
   int __cdecl wscanf(const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
               ^~~~~~
/usr/local/include/stdio.h:745:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vwscanf’
   int __cdecl __ms_vwscanf (const wchar_t * __restrict__ , va_list);
               ^~~~~~~~~~~~
/usr/local/include/stdio.h:746:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vfwscanf’
   int __cdecl __ms_vfwscanf (FILE * __restrict__ ,const wchar_t * __restrict__ ,va_list);
               ^~~~~~~~~~~~~
/usr/local/include/stdio.h:747:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vswscanf’
   int __cdecl __ms_vswscanf (const wchar_t * __restrict__ ,const wchar_t * __restrict__ ,va_list);
               ^~~~~~~~~~~~~
/usr/local/include/stdio.h:751:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vfwscanf (FILE *__stream,  const wchar_t *__format, __builtin_va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:758:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:764:3: error: expected ‘,’ or ‘;’ before ‘int’
   int vwscanf(const wchar_t *__format,  __builtin_va_list __local_argv)
   ^~~
/usr/local/include/stdio.h:771:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwprintf’
   int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
               ^~~~~~~~
/usr/local/include/stdio.h:772:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wprintf’
   int __cdecl wprintf(const wchar_t * __restrict__ _Format,...);
               ^~~~~~~
/usr/local/include/stdio.h:773:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vfwprintf’
   int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
               ^~~~~~~~~
/usr/local/include/stdio.h:774:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vwprintf’
   int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
               ^~~~~~~~
/usr/local/include/stdio.h:784:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wfsopen’
   _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
                         ^~~~~~~~
/usr/local/include/stdio.h:787:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgetwc’
   wint_t __cdecl fgetwc(FILE *_File);
                  ^~~~~~
/usr/local/include/stdio.h:788:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fgetwchar’
   _CRTIMP wint_t __cdecl _fgetwchar(void);
                          ^~~~~~~~~~
/usr/local/include/stdio.h:789:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fputwc’
   wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
                  ^~~~~~
/usr/local/include/stdio.h:790:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fputwchar’
   _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
                          ^~~~~~~~~~
/usr/local/include/stdio.h:791:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getwc’
   wint_t __cdecl getwc(FILE *_File);
                  ^~~~~
/usr/local/include/stdio.h:792:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getwchar’
   wint_t __cdecl getwchar(void);
                  ^~~~~~~~
/usr/local/include/stdio.h:793:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putwc’
   wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
                  ^~~~~
/usr/local/include/stdio.h:794:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putwchar’
   wint_t __cdecl putwchar(wchar_t _Ch);
                  ^~~~~~~~
/usr/local/include/stdio.h:795:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ungetwc’
   wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
                  ^~~~~~~
/usr/local/include/stdio.h:796:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgetws’
   wchar_t *__cdecl fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File);
                    ^~~~~~
/usr/local/include/stdio.h:797:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fputws’
   int __cdecl fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File);
               ^~~~~~
/usr/local/include/stdio.h:798:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_getws’
   _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                            ^~~~~~
/usr/local/include/stdio.h:799:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_putws’
   _CRTIMP int __cdecl _putws(const wchar_t *_Str);
                       ^~~~~~
/usr/local/include/stdio.h:801:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_scwprintf’
   _CRTIMP int __cdecl _scwprintf(const wchar_t * __restrict__ _Format,...);
                       ^~~~~~~~~~
/usr/local/include/stdio.h:802:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_swprintf_c’
   _CRTIMP int __cdecl _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...);
                       ^~~~~~~~~~~
/usr/local/include/stdio.h:803:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_vswprintf_c’
   _CRTIMP int __cdecl _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList);
                       ^~~~~~~~~~~~
/usr/local/include/stdio.h:804:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_snwprintf’
   _CRTIMP int __cdecl _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                       ^~~~~~~~~~
/usr/local/include/stdio.h:805:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_vsnwprintf’
   _CRTIMP int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                       ^~~~~~~~~~~
/usr/local/include/stdio.h:814:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_snwprintf’
   int __cdecl __ms_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
               ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:815:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ms_vsnwprintf’
   int __cdecl __ms_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list);
               ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:817:3: error: expected ‘;’ before ‘int’
   int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...)
   ^~~
/usr/local/include/stdio.h:827:3: error: expected ‘;’ before ‘int’
   int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg)
   ^~~
/usr/local/include/stdio.h:827:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vsnwprintf’
   int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg)
               ^~~~~~~~~~
/usr/local/include/stdio.h:836:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_swprintf’
   _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...);
                       ^~~~~~~~~
/usr/local/include/stdio.h:837:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_vswprintf’
   _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args);
                       ^~~~~~~~~~
In file included from /usr/local/include/stdio.h:840,
                 from test.c:1:
/usr/local/include/swprintf.inl:23:1: error: expected ‘,’ or ‘;’ before ‘int’
 int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv)
 ^~~
/usr/local/include/swprintf.inl:30:1: error: expected ‘,’ or ‘;’ before ‘int’
 int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...)
 ^~~
In file included from test.c:1:
/usr/local/include/stdio.h:850:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wtempnam’
   _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
                            ^~~~~~~~~
/usr/local/include/stdio.h:851:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_vscwprintf’
   _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
                       ^~~~~~~~~~~
/usr/local/include/stdio.h:852:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_snwscanf’
   _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...);
                       ^~~~~~~~~
/usr/local/include/stdio.h:853:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wfdopen’
   _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
                         ^~~~~~~~
/usr/local/include/stdio.h:854:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wfopen’
   _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t *__restrict__  _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                         ^~~~~~~
In file included from test.c:1:
/usr/local/include/stdio.h:855:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wfreopen’
   _CRTIMP FILE *__cdecl _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
                         ^~~~~~~~~
/usr/local/include/stdio.h:859:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wperror’
   _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
                        ^~~~~~~~
/usr/local/include/stdio.h:861:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wpopen’
   _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
                         ^~~~~~~
/usr/local/include/stdio.h:866:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wremove’
   _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
                       ^~~~~~~~
/usr/local/include/stdio.h:867:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wtmpnam’
   _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
                            ^~~~~~~~
/usr/local/include/stdio.h:868:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fgetwc_nolock’
   _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
                          ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:869:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fputwc_nolock’
   _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
                          ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:870:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_ungetwc_nolock’
   _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
                          ^~~~~~~~~~~~~~~
/usr/local/include/stdio.h:900:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_lock_file’
   _CRTIMP void __cdecl _lock_file(FILE *_File);
                        ^~~~~~~~~~
/usr/local/include/stdio.h:901:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_unlock_file’
   _CRTIMP void __cdecl _unlock_file(FILE *_File);
                        ^~~~~~~~~~~~
/usr/local/include/stdio.h:902:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fclose_nolock’
   _CRTIMP int __cdecl _fclose_nolock(FILE *_File);
                       ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:903:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fflush_nolock’
   _CRTIMP int __cdecl _fflush_nolock(FILE *_File);
                       ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:904:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fread_nolock’
   _CRTIMP size_t __cdecl _fread_nolock(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File);
                          ^~~~~~~~~~~~~
/usr/local/include/stdio.h:905:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fseek_nolock’
   _CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin);
                       ^~~~~~~~~~~~~
/usr/local/include/stdio.h:906:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_ftell_nolock’
   _CRTIMP long __cdecl _ftell_nolock(FILE *_File);
                        ^~~~~~~~~~~~~
/usr/local/include/stdio.h:907:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fseeki64_nolock’
   __MINGW_EXTENSION _CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin);
                                         ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:908:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_ftelli64_nolock’
   __MINGW_EXTENSION _CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File);
                                             ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:909:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_fwrite_nolock’
   _CRTIMP size_t __cdecl _fwrite_nolock(const void * __restrict__ _DstBuf,size_t _Size,size_t _Count,FILE * __restrict__ _File);
                          ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:910:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_ungetc_nolock’
   _CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File);
                       ^~~~~~~~~~~~~~
/usr/local/include/stdio.h:916:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘tempnam’
   char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
                 ^~~~~~~
/usr/local/include/stdio.h:917:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fcloseall’
   int __cdecl fcloseall(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~~~~~
/usr/local/include/stdio.h:918:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fdopen’
   FILE *__cdecl fdopen(int _FileHandle,const char *_Format) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
                 ^~~~~~
/usr/local/include/stdio.h:919:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fgetchar’
   int __cdecl fgetchar(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~~~~
/usr/local/include/stdio.h:920:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fileno’
   int __cdecl fileno(FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~~
/usr/local/include/stdio.h:921:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘flushall’
   int __cdecl flushall(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~~~~
/usr/local/include/stdio.h:922:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fputchar’
   int __cdecl fputchar(int _Ch) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~~~~
/usr/local/include/stdio.h:923:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getw’
   int __cdecl getw(FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~
/usr/local/include/stdio.h:924:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘putw’
   int __cdecl putw(int _Ch,FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~
/usr/local/include/stdio.h:925:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rmtmp’
   int __cdecl rmtmp(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
/usr/local/include/stdio.h:942:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_str_wide_utf8’
 int __cdecl __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen);
             ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:956:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_str_utf8_wide’
 int __cdecl __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen);
             ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:965:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_str_free’
 void __cdecl __mingw_str_free(void *ptr);
              ^~~~~~~~~~~~~~~~
/usr/local/include/stdio.h:971:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnl’
   _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
                            ^~~~~~~~
/usr/local/include/stdio.h:972:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnle’
   _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
                            ^~~~~~~~~
/usr/local/include/stdio.h:973:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnlp’
   _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
                            ^~~~~~~~~
/usr/local/include/stdio.h:974:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnlpe’
   _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
                            ^~~~~~~~~~
/usr/local/include/stdio.h:975:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnv’
   _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
                            ^~~~~~~~
/usr/local/include/stdio.h:976:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnve’
   _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
                            ^~~~~~~~~
/usr/local/include/stdio.h:977:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnvp’
   _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
                            ^~~~~~~~~
/usr/local/include/stdio.h:978:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_wspawnvpe’
   _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
                            ^~~~~~~~~~
/usr/local/include/stdio.h:995:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_spawnv’
   _CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList);
                            ^~~~~~~
/usr/local/include/stdio.h:996:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_spawnve’
   _CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
                            ^~~~~~~~
/usr/local/include/stdio.h:997:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_spawnvp’
   _CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList);
                            ^~~~~~~~
/usr/local/include/stdio.h:998:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_spawnvpe’
   _CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
                            ^~~~~~~~~
test.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
test.c: In function ‘main’:
test.c:4:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 printf("hello C is working");
 ^~~~~~
test.c:4:1: warning: incompatible implicit declaration of built-in function ‘printf’
test.c:4:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
test.c:2:1:
+#include <stdio.h>
 main()
test.c:4:1:
 printf("hello C is working");
 ^~~~~~

Neither glibc nor gcc reinstallation doesn't seem to have any result. Thank you in advance for any help!

Last edited by sashkent3 (2018-06-20 22:31:28)

Offline

#2 2018-06-20 21:39:05

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] My C compiler is broken

from /usr/local/include/stdio.h

What is installed in /usr/local/include /usr/local/bin etc?

Offline

#3 2018-06-20 21:40:26

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] My C compiler is broken

Why do you have mingw include files in /usr/local/include? They cause issues with all other compilers.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#4 2018-06-20 21:42:41

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED] My C compiler is broken

What is the output of which -a cc ?
What is the output of echo $PATH  ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2018-06-20 21:46:31

sashkent3
Member
Registered: 2018-06-20
Posts: 7

Re: [SOLVED] My C compiler is broken

ewaller wrote:

What is the output of which -a cc ?

/bin/cc
/usr/bin/cc
ewaller wrote:

What is the output of echo $PATH  ?

/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Offline

#6 2018-06-20 21:48:47

sashkent3
Member
Registered: 2018-06-20
Posts: 7

Re: [SOLVED] My C compiler is broken

progandy wrote:

Why do you have mingw include files in /usr/local/include? They cause issues with all other compilers.

I've tried to install it some time ago. Now I don't need it and as I thought I've completely uninstalled it.

Offline

#7 2018-06-20 21:59:41

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] My C compiler is broken

You'll have to clean up your /usr/local. If you have no manually built and installed packages, then it should be empty like this:

/usr/local
├── [drwxr-xr-x root     root    ]  bin
├── [drwxr-xr-x root     root    ]  etc
├── [drwxr-xr-x root     root    ]  games
├── [drwxr-xr-x root     root    ]  include
├── [drwxr-xr-x root     root    ]  lib
├── [drwxr-xr-x root     root    ]  man
├── [drwxr-xr-x root     root    ]  sbin
├── [drwxr-xr-x root     root    ]  share
│   ├── [drwxr-xr-x root     root    ]  ca-certificates
│   └── [lrwxrwxrwx root     root    ]  man -> ../man
└── [drwxr-xr-x root     root    ]  src

If you ever need mingw again, then you can look into the mingw-w64 packages in the AUR and the related guidelines:
https://wiki.archlinux.org/index.php/Mi … guidelines
https://wiki.archlinux.org/index.php/Cr … guidelines


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#8 2018-06-20 22:01:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED] My C compiler is broken

This is not the cause of your problem, but you don't need /bin and /usr/bin in your path.  They both point to the same place now (/bin is linked to /usr/bin) .  That is why the output of the which command listed two executable files -- they are the same file,   I was checking that you were picking up the correct compiler. 

Others are on the right track.  But, you may want to fix your path.

Last edited by ewaller (2018-06-20 22:01:50)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2018-06-20 22:12:25

sashkent3
Member
Registered: 2018-06-20
Posts: 7

Re: [SOLVED] My C compiler is broken

Thank you for your help!

progandy wrote:

You'll have to clean up your /usr/local. If you have no manually built and installed packages, then it should be empty like this:

/usr/local
├── [drwxr-xr-x root     root    ]  bin
├── [drwxr-xr-x root     root    ]  etc
├── [drwxr-xr-x root     root    ]  games
├── [drwxr-xr-x root     root    ]  include
├── [drwxr-xr-x root     root    ]  lib
├── [drwxr-xr-x root     root    ]  man
├── [drwxr-xr-x root     root    ]  sbin
├── [drwxr-xr-x root     root    ]  share
│   ├── [drwxr-xr-x root     root    ]  ca-certificates
│   └── [lrwxrwxrwx root     root    ]  man -> ../man
└── [drwxr-xr-x root     root    ]  src

If you ever need mingw again, then you can look into the mingw-w64 packages in the AUR and the related guidelines:
https://wiki.archlinux.org/index.php/Mi … guidelines
https://wiki.archlinux.org/index.php/Cr … guidelines

My /usr/local tree looks like this:

/usr/local
├── bin
├── etc
├── games
├── include
│   ├── ddk
│   ├── gdiplus
│   ├── GL
│   ├── psdk_inc
│   ├── sdks
│   ├── sec_api
│   │   └── sys
│   ├── sys
│   └── wrl
│       └── wrappers
├── lib
├── man
├── sbin
├── share
│   ├── appdata
│   ├── applications
│   ├── doc
│   ├── man -> ../man
│   └── pixmaps
└── src

How should I clean it? I think I've installed some packages manually.

Offline

#10 2018-06-20 22:19:14

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] My C compiler is broken

Your tree does not show any files, so I can only guess what you have there. You'll have to check what you still need and delete the rest. If there are only remnants from mingw, then it should be simple to delete everything below /usr/local and reinstall the filesystem package.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#11 2018-06-20 22:25:09

sashkent3
Member
Registered: 2018-06-20
Posts: 7

Re: [SOLVED] My C compiler is broken

progandy wrote:

Your tree does not show any files, so I can only guess what you have there. You'll have to check what you still need and delete the rest. If there are only remnants from mingw, then it should be simple to delete everything below /usr/local and reinstall the filesystem package.

I did as you said and now it works! Thank so much!

Offline

#12 2018-06-20 23:44:27

sashkent3
Member
Registered: 2018-06-20
Posts: 7

Re: [SOLVED] My C compiler is broken

ewaller wrote:

This is not the cause of your problem, but you don't need /bin and /usr/bin in your path.  They both point to the same place now (/bin is linked to /usr/bin) .  That is why the output of the which command listed two executable files -- they are the same file,   I was checking that you were picking up the correct compiler. 

Others are on the right track.  But, you may want to fix your path.

Ok, I'll change it then. Thank you!

Offline

Board footer

Powered by FluxBB