Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: ChaosLord on December 02, 2005, 02:56:28 PM
-
It would be nice if I could sometimes use C99 features in SASC. Is it possible?
For example declaring variables where they are needed, not always in the first few lines of a 'block'.
-
The same question from me :) http://www.amiga.org/forums/showthread.php?t=18951
but still not have answer. I think time to read all sasc documentation :) Becouse 'static declaration' problem already f**ked up for me ..
-
I think SAS was out before the C99 specification was complete. If you want C99 try VBCC.
-
@ChaosLord
Does SASC have a secret C99 switch?
No.
It would be nice if I could sometimes use C99 features in SASC. Is it possible?
No.
-
I think I found it here! Experimental C++ compiler.
It should have the feature we want.
https://www.warped.com/amiga/
But the file has been deleted!
:bigcry: :bigcry: :bigcry:
-
@ChaosLord
That stuff has nothing to do with C99 though.
Also, the C++ stuff wasn't very complete I'm afraid.
-
@Piru
I was under the impression that most C++ compilers, even unfinished experimental versions had many C99 features. (?)
-
vbcc is good, but little slower over sasc.
btw, only one think in sasc is annoing me - declaring variables in statemn blocks. Maybe any ideas to avoid/path it/etc ? Maybe kind of macros,or somethink like ..
-
VBCC is handy as a C99 compiler, although it doesn't implement everything in the C99 specification. That said, I haven't had any problems with it.
-
Does VBCC have a good graphical debugger as SASC does?
-
@ChaosLord
I was under the impression that most C++ compilers, even unfinished experimental versions had many C99 features. (?)
I guess it depends on your definition of 'many'.
Regardless C++ isn't C.
-
Piru wrote:
Regardless C++ isn't C.
True. If you write good clean C code, it should compile fine under C++ but there are more caveats than just the non implicit void * cast. You'd have to be unlucky to run into them, however.
For AmigaOS, the only real syntactical gotcha I ever stumbled across was the library base structure name / library base pointer name issue which was down the the deprecation of the 'struct' keyword beyond defining the structure:
struct IntuitionBase* IntuitionBase;
is fine in C, but in ANSI C++ it caused problems.
IntuitionBase* IntuitionBase;
was also a problem, I had to use
IntuitionBase* ::IntuitionBase;
:-)