How to Structure Array of Function Pointers

I know, that this thread is more than 5 years old, butr my question refers to Nick Gammon's post #11.

Question : Why does IDE 1.8.8 generating the error message

"ESP8266_Menu_Funktionen_Tes2t.ino:9:4: error: 'Page1' was not declared in this scope
&Page1,
^
ESP8266_Menu_Funktionen_Tes2t.ino:10:4: error: 'Page2' was not declared in this scope
&Page2,
^
ESP8266_Menu_Funktionen_Tes2t.ino:11:4: error: 'Page3' was not declared in this scope
&Page3"

if the code in post #11 is structured like that :

typedef void (* GenericFP)();

GenericFP MenuFP[3] = {
   &Page1, 
   &Page2, 
   &Page3
};

int i = 0;

void setup()
  {
  Serial.begin (115200);
  }

void loop()
  {
  
  MenuFP [i++] ();
  
  if (i >= 3)
    i = 0;
    
  delay (1000);
  }

void Page1()
  {
  Serial.println ("page1");
  }

void Page2()
  {
  Serial.println ("page2");
  }

void Page3()
  {
  Serial.println ("page3");
  }

if you structure "GenericFP MenuFP[3] = {&Page1, &Page2, &Page3};" this way, it compiles without any error and runs as expected

Looks like it's something to do with Arduino's "Helpful" automatic function prototype generation. Try supplying your own prototypes:

void Page1();
void Page2();
void Page3();
typedef void (* GenericFP)();

GenericFP MenuFP[] = {
  &Page1,
  &Page2,
  &Page3
};

Hi gfvalvo,

with your suggested "own prototyping", the compilation run through flawlessly. But still the root cause is somehow unclear to me. This "helpful" automatic prototyping generation in IDE 1.8.8 was preventing me in migrating an older sketch, writting in former IDE times to the new age, and I couldn't imagine, that the error message is based on the difference between
A) GenericFP MenuFP[] = {&Page1, &Page2, &Page3}; and
B) GenericFP MenuFP[] = {
&Page1,
&Page2,
&Page3
};

I bet, that these "new features" can newbies drive nuts.

Anyhow, thank you very much for your help !

Maro