[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] optimization missed?

From: Bernard Fouché
Subject: Re: [avr-gcc-list] optimization missed?
Date: Fri, 11 Jul 2008 15:48:35 +0200
User-agent: Thunderbird (Windows/20080421)

How a 'void' function can return something? Normally the compiler refuses such code..

Douglas Hammond wrote:

void test(uint8_t axis_index) {
   return (_axis[axis_index].state);


void test(uint8_t axis_index) {
   axis_control_s* axis = (axis_control_s*) &_axis[axis_index];
   return (axis->state);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]