Post by r***@gmail.comBlind guess, but see the bit about "-fgnu89-inline". This kind of
thing has bitten people before.
That helps indeed...only some warnings:
***@atmarama ~/r/e/m2c-rework> make
gcc -MM m2-lexer.c m2-filereader.c m2-fileutils.c m2-token.c m2-
tokenset.c m2-error.c m2-production.c m2-resync-sets.c m2-parser.c m2-
unique-string.c m2-compiler-options.c m2c.c m2-lexer.c m2-filereader.c
m2-fileutils.c m2-token.c m2-tokenset.c m2-error.c m2-unique-string.c
m2-compiler-options.c testlex.c m2-token.c m2-tokenset.c
gen_first_sets.c m2-token.c m2-tokenset.c gen_follow_sets.c m2-token.c
m2-tokenset.c gen_resync_sets.c m2-token.c m2-tokenset.c m2-production.c
m2-error.c m2-compiler-options.c print_first_sets.c m2-token.c m2-
tokenset.c m2-production.c m2-error.c m2-compiler-options.c
print_follow_sets.c > depends.mk
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-lexer.c -o m2-lexer.o
m2-lexer.c: In function ‘skip_block_comment’:
m2-lexer.c:935:19: warning: unused variable ‘quote’ [-Wunused-variable]
char next_char, quote;
^
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-filereader.c -o m2-
filereader.o
m2-filereader.c: In function ‘m2c_la2_char’:
m2-filereader.c:520:12: warning: ‘index’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
if (index+1 == infile->buflen) {
^
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-fileutils.c -o m2-
fileutils.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-token.c -o m2-token.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-tokenset.c -o m2-
tokenset.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-error.c -o m2-error.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-production.c -o m2-
production.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-resync-sets.c -o m2-
resync-sets.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-parser.c -o m2-parser.o
m2-parser.c: In function ‘unqualified_import’:
m2-parser.c:545:16: warning: variable ‘module_ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t module_ident;
^
m2-parser.c: In function ‘ident_list’:
m2-parser.c:583:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘const_definition’:
m2-parser.c:719:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘type_definition’:
m2-parser.c:753:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘qualident’:
m2-parser.c:909:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘countable_type’:
m2-parser.c:1049:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘variant_fields’:
m2-parser.c:1448:23: warning: variable ‘type_ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident, type_ident;
^
m2-parser.c:1448:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident, type_ident;
^
m2-parser.c: In function ‘procedure_signature’:
m2-parser.c:1896:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘type_declaration’:
m2-parser.c:2423:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘var_size_record_type’:
m2-parser.c:2468:32: warning: variable ‘size_field’ set but not used [-
Wunused-but-set-variable]
m2c_string_t var_size_field, size_field;
^
m2-parser.c:2468:16: warning: variable ‘var_size_field’ set but not used
[-Wunused-but-set-variable]
m2c_string_t var_size_field, size_field;
^
m2-parser.c: In function ‘procedure_declaration’:
m2-parser.c:2625:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘for_statement’:
m2-parser.c:3534:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘selector’:
m2-parser.c:3651:16: warning: variable ‘ident’ set but not used [-
Wunused-but-set-variable]
m2c_string_t ident;
^
m2-parser.c: In function ‘factor’:
m2-parser.c:3907:16: warning: variable ‘lexeme’ set but not used [-
Wunused-but-set-variable]
m2c_string_t lexeme;
^
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-unique-string.c -o m2-
unique-string.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2-compiler-options.c -o
m2-compiler-options.o
gcc -c -Wall -Wno-comments -g -fgnu89-inline m2c.c -o m2c.o
gcc m2-lexer.o m2-filereader.o m2-fileutils.o m2-token.o m2-tokenset.o
m2-error.o m2-production.o m2-resync-sets.o m2-parser.o m2-unique-
string.o m2-compiler-options.o m2c.o -o m2c
gcc -c -Wall -Wno-comments -g -fgnu89-inline testlex.c -o testlex.o
gcc m2-lexer.o m2-filereader.o m2-fileutils.o m2-token.o m2-tokenset.o
m2-error.o m2-unique-string.o m2-compiler-options.o testlex.o -o testlex
gcc -c -Wall -Wno-comments -g -fgnu89-inline gen_first_sets.c -o
gen_first_sets.o
gcc m2-token.o m2-tokenset.o gen_first_sets.o -o gen_first_sets
gcc -c -Wall -Wno-comments -g -fgnu89-inline gen_follow_sets.c -o
gen_follow_sets.o
gcc m2-token.o m2-tokenset.o gen_follow_sets.o -o gen_follow_sets
gcc -c -Wall -Wno-comments -g -fgnu89-inline gen_resync_sets.c -o
gen_resync_sets.o
gcc m2-token.o m2-tokenset.o gen_resync_sets.o -o gen_resync_sets
gcc -c -Wall -Wno-comments -g -fgnu89-inline print_first_sets.c -o
print_first_sets.o
gcc m2-token.o m2-tokenset.o m2-production.o m2-error.o m2-compiler-
options.o print_first_sets.o -o print_first_sets
gcc -c -Wall -Wno-comments -g -fgnu89-inline print_follow_sets.c -o
print_follow_sets.o
gcc m2-token.o m2-tokenset.o m2-production.o m2-error.o m2-compiler-
options.o print_follow_sets.o -o print_follow_sets
Sincerely,
Gour
--
Everyone is forced to act helplessly according to the qualities
he has acquired from the modes of material nature; therefore no
one can refrain from doing something, not even for a moment.