Why not (finally) expose main.cpp to the user ?

Well... this

void setup() {
  Serial.begin(9600);
  Serial.println("setup does not run");
}

void loop() {
  Serial.println("loop does not run");
  pinMode(13,OUTPUT);
}

int main() {
  init();
  Serial.begin(9600);
  while (1) {
    Serial.println("My main is running");
    delay(1000);
  }
}

compiles on 0022 and not on 1.0-rc1.

I've had a quick look on the compiler/linker parameters, but can't find a difference.

Error on 1.0-rc1:

avr-gcc -Os -Wl,--gc-sections -mmcu=atmega168 -o /tmp/build792419732568248348.tmp/sketch_oct16a.cpp.elf /tmp/build792419732568248348.tmp/sketch_oct16a.cpp.o /tmp/build792419732568248348.tmp/core.a -L/tmp/build792419732568248348.tmp -lm 
core.a(main.cpp.o): In function `main':
/XXX/arduino-1.0-rc1/hardware/arduino/cores/arduino/main.cpp:6: multiple definition of `main'
sketch_oct16a.cpp.o:sketch_oct16a.cpp:16: first defined here

This error vanishes when adding the 'weak' attribute as pointed out before.

I feel that if this compiles (works?) on 0022, it should do the same on 1.0