Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO C99 and later do not support implicit int #54

Open
mathbird opened this issue May 16, 2024 · 2 comments
Open

ISO C99 and later do not support implicit int #54

mathbird opened this issue May 16, 2024 · 2 comments

Comments

@mathbird
Copy link

Hi,

I am trying to build mpiP using "icx" on intel CPUs, but met the following issue. how to fix it?

pc_lookup.c:115:41: error: parameter 'data' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
find_address_in_section (abfd, section, data)
                                        ^
pc_lookup.c:118:6: error: expected function body after function declarator
     PTR data;
     ^
pc_lookup.c:119:1: error: expected identifier or '('
{
^
pc_lookup.c:438:58: error: use of undeclared identifier 'PTR'
  bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL);
                                                         ^
pc_lookup.c:438:32: error: use of undeclared identifier 'find_address_in_section'
  bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL);
                               ^
pc_lookup.c:480:35: error: use of undeclared identifier 'PTR'
                                 (PTR) NULL);
                                  ^
pc_lookup.c:479:44: error: use of undeclared identifier 'find_address_in_section'
          bfd_map_over_sections (fso->bfd, find_address_in_section,
                                           ^
7 errors generated.
make: *** [Rules.mak:6: pc_lookup.o] Error 1

@mathbird
Copy link
Author

here is the configure output

********************************************************************************
  mpiP Configuration Summary

  C compiler               : mpicc
  C++ compiler             : icpx
  Fortran compiler         : ifx
  Python                   : python

  Timer                    : MPI_Wtime
  Stack Unwinding          : libunwind
  Address to Source Lookup : bfd

  MPI-I/O support          : yes
  MPI-RMA support          : yes
  MPI-NBC support          : yes
********************************************************************************

@mathbird
Copy link
Author

if I change find_address_in_section in pc_lookup.c as follows, the compiler then said "pc_lookup.c:121:56: error: unknown type name 'PTR'"

// static void
// find_address_in_section (abfd, section, data)
//      bfd *abfd;
//      asection *section;
//      PTR data;

static void
find_address_in_section (bfd *abfd, asection *section, PTR  data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant