Forum Discussion
6 Replies
- Altera_Forum
Honored Contributor
Looks like a typo, or something tried to process it in some markup language and got confused.
You'll probably have to work out what was meant from the context. - Altera_Forum
Honored Contributor
--- Quote Start --- Looks like a typo, or something tried to process it in some markup language and got confused. You'll probably have to work out what was meant from the context. --- Quote End --- This instruction exist really in the code and compile with an older version of nios2-elf-gcc (NIOS II EDS 6.0), that s not a markup or a typo :( (I do a migration of an older code which compil) - Altera_Forum
Honored Contributor
It doesn't look like valid C. The ? operator is only used in a "test ? if_true : if_false" construction. Are you sure that this code line was actually compiled with your older version of gcc? Could it be excluded with an# ifdef ?
- Altera_Forum
Honored Contributor
gcc has supported some 'extensions' in the past, their use is discouraged and I don't know the syntax.
There was one for: if (x != 0); return x; And there might have been one for min/max - which could be the one you have there. With enough actual context you should be able to work out what has intended. - Altera_Forum
Honored Contributor
Oh yes you are right! GCC versions prior to 4.0 supported the <? (min) and >? (max) operators, as well as <?= and >?= to assign min and max values. Those were deprecated in 4.0.
You can probably replace them with MIN() and MAX() macros or functions. - Altera_Forum
Honored Contributor
--- Quote Start --- Oh yes you are right! GCC versions prior to 4.0 supported the <? (min) and >? (max) operators, as well as <?= and >?= to assign min and max values. Those were deprecated in 4.0. You can probably replace them with MIN() and MAX() macros or functions. --- Quote End --- This is consistent with the code of my application. Thank you very much.