Skip to content

Commit

Permalink
Make Stacker Runtime -pedantic clean.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31390 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Reid Spencer committed Nov 3, 2006
1 parent 7bd7873 commit 939c687
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
3 changes: 0 additions & 3 deletions projects/Stacker/lib/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ DONT_BUILD_RELINKED = 1
MODULE_NAME = stkr_runtime

include $(LEVEL)/Makefile.common

CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts))
CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts))
19 changes: 10 additions & 9 deletions projects/Stacker/lib/runtime/stacker_rt.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- stacker_rt.c - Runtime Support For Stacker Compiler -----*- C++ -*-===//
/*===-- stacker_rt.c - Runtime Support For Stacker Compiler -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
Expand All @@ -15,7 +15,7 @@
// The real reason this is here is to test LLVM's ability to link with
// separately compiled software.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===*/

#include <ctype.h>
#include <stdio.h>
Expand All @@ -40,14 +40,15 @@ _stacker_dump_stack_()
int
main ( int argc, char** argv )
{
// Avoid modifying argc
/* Avoid modifying argc */
int a = argc;

// Make sure we're starting with the right index
/* Make sure we're starting with the right index */
_index_ = 0;

// Copy the arguments to the stack in reverse order
// so that they get popped in the order presented
/* Copy the arguments to the stack in reverse order
* so that they get popped in the order presented
*/
while ( a > 0 )
{
if ( isdigit( (int) argv[--a][0] ) )
Expand All @@ -60,13 +61,13 @@ main ( int argc, char** argv )
}
}

// Put the argument count on the stack
/* Put the argument count on the stack */
_stack_[_index_] = argc;

// Invoke the user's main program
/* Invoke the user's main program */
_MAIN_();

// Return last item on the stack
/* Return last item on the stack */
if ( _index_ >= 0 )
return _stack_[_index_];
return -1;
Expand Down

0 comments on commit 939c687

Please sign in to comment.