public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Errors : '__INTPTR_TYPE__' undeclared while building GCC 12.1.0 for symbian
@ 2022-06-10 12:44 Fiodar Stryzhniou
  2022-06-12 11:31 ` Fiodar Stryzhniou
  0 siblings, 1 reply; 4+ messages in thread
From: Fiodar Stryzhniou @ 2022-06-10 12:44 UTC (permalink / raw)
  To: gcc-help

OS - Devuan Chimaera 4.0 stable release

Config:
configure  --target=$TARGET --prefix=$PREFIX  --without-headers \
     --enable-languages="c,c++,lto" --enable-lto --enable-interwork \
     --enable-long-long --enable-tls --enable-multilib --enable-wchar_t \
     --enable-c99 --with-newlib --with-dwarf2 
--with-static-standard-libraries \
     --disable-hosted-libstdcxx --disable-libstdcxx-pch --disable-shared \
     --disable-option-checking --disable-threads --disable-nls \
     --disable-win32-registry --disable-libssp --disable-libquadmath

I redirected build errors to file(make -j6 -k 2> make-gcc.log):
../../../gcc-12.1.0/./libgcc/libgcov-driver.c: In function 
'write_topn_counters':
../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:56: error: 
'__INTPTR_TYPE__' undeclared (first use in this function); did you mean 
'INTPTR_TYPE'?
   457 |       for (struct gcov_kvp *node = (struct gcov_kvp 
*)(__INTPTR_TYPE__)start;
       | 
^~~~~~~~~~~~~~~
       |                                                        INTPTR_TYPE
../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:56: note: each 
undeclared identifier is reported only once for each function it appears in
../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:72: error: expected 
',' or ';' before 'start'
   457 |       for (struct gcov_kvp *node = (struct gcov_kvp 
*)(__INTPTR_TYPE__)start;
       | 
         ^~~~~
../../../gcc-12.1.0/./libgcc/libgcov-driver.c:454:17: warning: unused 
variable 'start' [-Wunused-variable]
   454 |       gcov_type start = ci_ptr->values[GCOV_TOPN_MEM_COUNTERS * 
i + 2];
       |                 ^~~~~
../../../gcc-12.1.0/./libgcc/libgcov-driver.c:476:72: error: expected 
',' or ';' before 'start'
   476 |       for (struct gcov_kvp *node = (struct gcov_kvp 
*)(__INTPTR_TYPE__)start;
       | 
         ^~~~~
../../../gcc-12.1.0/./libgcc/libgcov-driver.c:473:17: warning: unused 
variable 'start' [-Wunused-variable]
   473 |       gcov_type start = ci_ptr->values[GCOV_TOPN_MEM_COUNTERS * 
i + 2];
       |                 ^~~~~
make[2]: *** [Makefile:928: _gcov_info_to_gcda.o] Error 1
-- 
Fiodar Stryzhniou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Errors : '__INTPTR_TYPE__' undeclared while building GCC 12.1.0 for symbian
  2022-06-10 12:44 Errors : '__INTPTR_TYPE__' undeclared while building GCC 12.1.0 for symbian Fiodar Stryzhniou
@ 2022-06-12 11:31 ` Fiodar Stryzhniou
  2022-06-15 20:22   ` Re[2]: " Fiodar
  0 siblings, 1 reply; 4+ messages in thread
From: Fiodar Stryzhniou @ 2022-06-12 11:31 UTC (permalink / raw)
  To: gcc-help

6/10/22 у 3:44 PM Fiodar Stryzhniou напісаў:
> OS - Devuan Chimaera 4.0 stable release
> 
> Config:
> configure  --target=$TARGET --prefix=$PREFIX  --without-headers \
>      --enable-languages="c,c++,lto" --enable-lto --enable-interwork \
>      --enable-long-long --enable-tls --enable-multilib --enable-wchar_t \
>      --enable-c99 --with-newlib --with-dwarf2 
> --with-static-standard-libraries \
>      --disable-hosted-libstdcxx --disable-libstdcxx-pch --disable-shared \
>      --disable-option-checking --disable-threads --disable-nls \
>      --disable-win32-registry --disable-libssp --disable-libquadmath
> 
> I redirected build errors to file(make -j6 -k 2> make-gcc.log):
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c: In function 
> 'write_topn_counters':
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:56: error: 
> '__INTPTR_TYPE__' undeclared (first use in this function); did you mean 
> 'INTPTR_TYPE'?
>    457 |       for (struct gcov_kvp *node = (struct gcov_kvp 
> *)(__INTPTR_TYPE__)start;
>        | ^~~~~~~~~~~~~~~
>        |                                                        INTPTR_TYPE
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:56: note: each 
> undeclared identifier is reported only once for each function it appears in
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:72: error: expected 
> ',' or ';' before 'start'
>    457 |       for (struct gcov_kvp *node = (struct gcov_kvp 
> *)(__INTPTR_TYPE__)start;
>        |         ^~~~~
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:454:17: warning: unused 
> variable 'start' [-Wunused-variable]
>    454 |       gcov_type start = ci_ptr->values[GCOV_TOPN_MEM_COUNTERS * 
> i + 2];
>        |                 ^~~~~
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:476:72: error: expected 
> ',' or ';' before 'start'
>    476 |       for (struct gcov_kvp *node = (struct gcov_kvp 
> *)(__INTPTR_TYPE__)start;
>        |         ^~~~~
> ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:473:17: warning: unused 
> variable 'start' [-Wunused-variable]
>    473 |       gcov_type start = ci_ptr->values[GCOV_TOPN_MEM_COUNTERS * 
> i + 2];
>        |                 ^~~~~
> make[2]: *** [Makefile:928: _gcov_info_to_gcda.o] Error 1

I create file test_macro.c with content:
#ifdef __INTPTR_TYPE__
#warning "__INTPTR_TYPE__ defined!"
#else
#error "__INTPTR_TYPE__ not defined!"
#endif

Tried:
gcc-11.2.0/bin$ ./arm-none-symbianelf-gcc -c test_macro.c
test_macro.c:4:2: error: #error "__INTPTR_TYPE__ not defined!"

Any ideas?


-- 
Fiodar Stryzhniou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re[2]: Errors : '__INTPTR_TYPE__' undeclared while building GCC 12.1.0 for symbian
  2022-06-12 11:31 ` Fiodar Stryzhniou
@ 2022-06-15 20:22   ` Fiodar
  2022-06-16  9:41     ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Fiodar @ 2022-06-15 20:22 UTC (permalink / raw)
  To: Fiodar Stryzhniou; +Cc: gcc-help



I tried GCC 3.4.3 shipped with Symbian SDK. Result same.
 
I googled for «__INTPTR_TYPE__» and found —  https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
Сitation :
«Some of these macros may not be defined on particular systems if GCC does not provide a stdint.h header on those systems.»
I look for «INTPTR_TYPE» in gcc sources and found headers named {target}-stdint.h
We are talking about these files, right?
 
> Нядзеля, 12 чэрвеня 2022, 14:32 +03:00 ад Fiodar Stryzhniou <fedor_qd@mail.ru>:
>
> 6/10/22 у 3:44 PM Fiodar Stryzhniou напісаў:
> > OS - Devuan Chimaera 4.0 stable release
> >
> > Config:
> > configure  --target=$TARGET --prefix=$PREFIX  --without-headers \
> >     --enable-languages="c,c++,lto" --enable-lto --enable-interwork \
> >     --enable-long-long --enable-tls --enable-multilib --enable-wchar_t \
> >     --enable-c99 --with-newlib --with-dwarf2
> > --with-static-standard-libraries \
> >     --disable-hosted-libstdcxx --disable-libstdcxx-pch --disable-shared \
> >     --disable-option-checking --disable-threads --disable-nls \
> >     --disable-win32-registry --disable-libssp --disable-libquadmath
> >
> > I redirected build errors to file(make -j6 -k 2> make-gcc.log):
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c: In function
> > 'write_topn_counters':
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:56: error:
> > '__INTPTR_TYPE__' undeclared (first use in this function); did you mean
> > 'INTPTR_TYPE'?
> >   457 |       for (struct gcov_kvp *node = (struct gcov_kvp
> > *)(__INTPTR_TYPE__)start;
> >       | ^~~~~~~~~~~~~~~
> >       |                                                        INTPTR_TYPE
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:56: note: each
> > undeclared identifier is reported only once for each function it appears in
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:457:72: error: expected
> > ',' or ';' before 'start'
> >   457 |       for (struct gcov_kvp *node = (struct gcov_kvp
> > *)(__INTPTR_TYPE__)start;
> >       |         ^~~~~
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:454:17: warning: unused
> > variable 'start' [-Wunused-variable]
> >   454 |       gcov_type start = ci_ptr->values[GCOV_TOPN_MEM_COUNTERS *
> > i + 2];
> >       |                 ^~~~~
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:476:72: error: expected
> > ',' or ';' before 'start'
> >   476 |       for (struct gcov_kvp *node = (struct gcov_kvp
> > *)(__INTPTR_TYPE__)start;
> >       |         ^~~~~
> > ../../../gcc-12.1.0/./libgcc/libgcov-driver.c:473:17: warning: unused
> > variable 'start' [-Wunused-variable]
> >   473 |       gcov_type start = ci_ptr->values[GCOV_TOPN_MEM_COUNTERS *
> > i + 2];
> >       |                 ^~~~~
> > make[2]: *** [Makefile:928: _gcov_info_to_gcda.o] Error 1
> I create file test_macro.c with content:
> #ifdef __INTPTR_TYPE__
> #warning "__INTPTR_TYPE__ defined!"
> #else
> #error "__INTPTR_TYPE__ not defined!"
> #endif
> > Tried:
> gcc-11.2.0/bin$ ./arm-none-symbianelf-gcc -c test_macro.c
> test_macro.c:4:2: error: #error "__INTPTR_TYPE__ not defined!"
> > Any ideas?
>
> --
> Fiodar Stryzhniou  
 
Stryzhniou Fiodar
Стрижнёв Федор
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re[2]: Errors : '__INTPTR_TYPE__' undeclared while building GCC 12.1.0 for symbian
  2022-06-15 20:22   ` Re[2]: " Fiodar
@ 2022-06-16  9:41     ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2022-06-16  9:41 UTC (permalink / raw)
  To: Fiodar; +Cc: gcc-help

On Wed, 15 Jun 2022 at 21:24, Fiodar <fedor_qd@mail.ru> wrote:
>
>
>
> I tried GCC 3.4.3 shipped with Symbian SDK. Result same.
>
> I googled for «__INTPTR_TYPE__» and found —  https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
> Сitation :
> «Some of these macros may not be defined on particular systems if GCC does not provide a stdint.h header on those systems.»
> I look for «INTPTR_TYPE» in gcc sources and found headers named {target}-stdint.h
> We are talking about these files, right?

You need Symbian's <stdint.h>

The gcc xxx-stdint.h file is only used if you compile with
-ffreestanding so the OS <stdint.h> isn't used.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-16  9:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 12:44 Errors : '__INTPTR_TYPE__' undeclared while building GCC 12.1.0 for symbian Fiodar Stryzhniou
2022-06-12 11:31 ` Fiodar Stryzhniou
2022-06-15 20:22   ` Re[2]: " Fiodar
2022-06-16  9:41     ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).