DU3

Uživatelský avatar
rastik
Supermatfyz(ák|ačka)
Příspěvky: 661
Registrován: 19. 10. 2005 21:45
Typ studia: Informatika Mgr.
Bydliště: Praha
Kontaktovat uživatele:

DU3

Příspěvek od rastik »

Skusal uz niekto z vas projekt pre DU3? Kompilacia zdrojaku vygenerovaneho z bisonu mi hlasi 16 varovani.
Pri implementacii som narazil na par veci:
- chyba mi DUTOK_PACKED
- mam nejak specialne riesit 'vyraz typu ...' (boolean, ord. typu)?
- obdobne pre rozne druhy identifikatorov
- ako je definovany symbolicky identifikator?
- mam nejak riesit konstantu 'znak'?
Pytam sa radsej najprv tu, ci to nespominali na cviceniach. Pokial nie, budem to smerovat na Yaghoba.
Btw. kolko konfliktov ste mali po prvej casti? Mne to vyliezlo az na 12 shift/reduce, 21 reduce/reduce.
fissie
Matfyz(ák|ačka) level I
Příspěvky: 34
Registrován: 10. 11. 2006 20:41
Typ studia: Informatika Bc.
Kontaktovat uživatele:

Re: DU3

Příspěvek od fissie »

- chyba mi DUTOK_PACKED
Zadny DUTOK_PACKED neni a nema byt, packed pole v Mlaskalu nejsou. Mozna to bylo v nejakych hodne brzkych verzich obrazku, nevim, ale ted tam nejsou a ani v projektech pro prvni a druhy domaci ukol DUTOK_PACKED neni.
- mam nejak specialne riesit 'vyraz typu ...' (boolean, ord. typu)?
Zatim ne, pouze si to poznamenat do komentare.
- obdobne pre rozne druhy identifikatorov
Tez.
- ako je definovany symbolicky identifikator?
Zatim resit jako kazdy jiny identifikator. Pokud se nepletu, tak se jednalo o veci jako treba true ci false, i kdyz ted si uplne nejsem jist, je uz pozdni hodina.
- mam nejak riesit konstantu 'znak'?
Takove konstanty v Mlaskalu nejsou, vsecko jsou retezce.
Uživatelský avatar
rastik
Supermatfyz(ák|ačka)
Příspěvky: 661
Registrován: 19. 10. 2005 21:45
Typ studia: Informatika Mgr.
Bydliště: Praha
Kontaktovat uživatele:

Re: DU3

Příspěvek od rastik »

fissie píše:
- chyba mi DUTOK_PACKED
Zadny DUTOK_PACKED neni a nema byt, packed pole v Mlaskalu nejsou. Mozna to bylo v nejakych hodne brzkych verzich obrazku, nevim, ale ted tam nejsou a ani v projektech pro prvni a druhy domaci ukol DUTOK_PACKED neni.
- mam nejak specialne riesit 'vyraz typu ...' (boolean, ord. typu)?
Zatim ne, pouze si to poznamenat do komentare.
- obdobne pre rozne druhy identifikatorov
Tez.
- ako je definovany symbolicky identifikator?
Zatim resit jako kazdy jiny identifikator. Pokud se nepletu, tak se jednalo o veci jako treba true ci false, i kdyz ted si uplne nejsem jist, je uz pozdni hodina.
- mam nejak riesit konstantu 'znak'?
Takove konstanty v Mlaskalu nejsou, vsecko jsou retezce.
Super, diky za info. Skoda, ze na zmenu obrazkov neupozornili, tie co su tam teraz uz naozaj nemaju packed ani znakove konstanty.
LuKu
Matfyz(ák|ačka) level III
Příspěvky: 117
Registrován: 15. 1. 2005 18:29
Typ studia: Informatika Mgr.

Re: DU3

Příspěvek od LuKu »

rastik píše:Btw. kolko konfliktov ste mali po prvej casti? Mne to vyliezlo az na 12 shift/reduce, 21 reduce/reduce.
Já měla po nadatlení a první kompilaci 13 shift/reduce a 1 reduce/reduce, teď (o několik minut později) je to 2 a 1, což vypadá docela nadějně :-)
Uživatelský avatar
rastik
Supermatfyz(ák|ačka)
Příspěvky: 661
Registrován: 19. 10. 2005 21:45
Typ studia: Informatika Mgr.
Bydliště: Praha
Kontaktovat uživatele:

Re: DU3

Příspěvek od rastik »

LuKu píše:
rastik píše:Btw. kolko konfliktov ste mali po prvej casti? Mne to vyliezlo az na 12 shift/reduce, 21 reduce/reduce.
Já měla po nadatlení a první kompilaci 13 shift/reduce a 1 reduce/reduce, teď (o několik minut později) je to 2 a 1, což vypadá docela nadějně :-)
Tak to mas aspon menej prace :lol: R/R mizli rychlo, S/R ubudali mrsky pomalsie.
Premyslam, ako budu tuto ulohu hodnotit. Pokial tomu podhodia iba jeden subor, tak ten musi byt bud spravny alebo to skonci na prvej syntaktickej chybe. Pokial je spravny, tak vypise iba OK a tazko sa bude dohladavat, ci tam dotycny vsetko vyriesil alebo to proste iba sucho odignoroval. Realne sa to bude dat zistit az v medzikode, nie?
LuKu
Matfyz(ák|ačka) level III
Příspěvky: 117
Registrován: 15. 1. 2005 18:29
Typ studia: Informatika Mgr.

Příspěvek od LuKu »

Taky jsem přemýšlela nad tím, jak to hodlají testovat (nebo spíš jak to budu testovat já :) ), zatim jsem na nic převratnýho nepřišla.

Nedá se Bison nějak přinutit k podrobnějšímu vypisování chyb? Teď jsem zkušebně ubrala příkaz if, protože jsem v něm tušila chybu, a Bison se omezil na to, že mám 2 konflikty shift/reduce :( Ráda bych aspoň zhruba věděla kde...
Uživatelský avatar
rastik
Supermatfyz(ák|ačka)
Příspěvky: 661
Registrován: 19. 10. 2005 21:45
Typ studia: Informatika Mgr.
Bydliště: Praha
Kontaktovat uživatele:

Příspěvek od rastik »

LuKu píše:Nedá se Bison nějak přinutit k podrobnějšímu vypisování chyb? Teď jsem zkušebně ubrala příkaz if, protože jsem v něm tušila chybu, a Bison se omezil na to, že mám 2 konflikty shift/reduce :( Ráda bych aspoň zhruba věděla kde...
Asi hladas subor du3g.output, bison ho vytvori pri zdrojakoch. Pomoze to zbaveniu sa konfliktov a mozno ho v nejakej forme vyuziju aj oni pri vyhodnocovani.
LuKu
Matfyz(ák|ačka) level III
Příspěvky: 117
Registrován: 15. 1. 2005 18:29
Typ studia: Informatika Mgr.

Příspěvek od LuKu »

Díky, nějak mě v tu chvíli nenapadlo nakouknout do dokumentace :oops:

Všechny konflikty už jsem odstranila a testovací soubor mi v pořádku prochází, ale VS2005 při překladu hlásí 16 varování :( Všechna jsou v du3g.cpp, takže nevím, jestli za ně můžu já, nebo Bison. Proto bych ráda věděla, jak jsou na tom ostatní...
Návštěvník

Příspěvek od Návštěvník »

LuKu píše:VS2005 při překladu hlásí 16 varování :( Všechna jsou v du3g.cpp, takže nevím, jestli za ně můžu já, nebo Bison. Proto bych ráda věděla, jak jsou na tom ostatní...
Lucko, myslim, ze muzes byt v klidu. Ja mam sice nad du3g.cpp "jen" 14 varovani, ale celkove (i s tim lexem) asi 24 :(

a nejvic me vadi toto primo nad du3g.y:

"warning C4100: 'ctx' : unreferenced formal parameter"

nevite nekdo, jakym zpusobem a kde to MlaskalCtx *ctx z hlavicky yyeroru v du3g.y vyuzit? ja si myslela, ze zadny semanticky akce k tem pravidlum zatim psat nemame.
Uživatelský avatar
lavor
Matfyz(ák|ačka) level III
Příspěvky: 121
Registrován: 1. 2. 2005 20:39
Typ studia: Informatika Bc.
Bydliště: kolej 17.11., A1105
Kontaktovat uživatele:

Příspěvek od lavor »

narazil som na technicky problem
v testovacom subore sa nachadza blok:

Kód: Vybrat vše

begin
    i := c1;
end;
a pritom z obrazku plynie ze pred endom nema byt ;
http://ulita.ms.mff.cuni.cz/pub/predn/ ... -a-1a.jpg

co myslite?

tak si aj odpoviem po konzultacii s Tiborom vysvitlo ze prikaz je aj prazdny prikaz, co som si predtym nevsimol, takze to je v pohode
Milujeme tých, čo nás odmietajú, odmietame tých, čo nás milujú.
Uživatelský avatar
lavor
Matfyz(ák|ačka) level III
Příspěvky: 121
Registrován: 1. 2. 2005 20:39
Typ studia: Informatika Bc.
Bydliště: kolej 17.11., A1105
Kontaktovat uživatele:

Příspěvek od lavor »

takze po odstraneni konfliktov mi hadze visual studio 16 "bisonich" varovani:

Kód: Vybrat vše

.\du3g.cpp(282) : warning C4565: 'malloc' : redefinition; the symbol was previously declared with __declspec(restrict)
.\du3g.cpp(282) : warning C4565: 'malloc' : redefinition; the symbol was previously declared with __declspec(noalias)
.\du3g.cpp(282) : warning C4273: 'malloc' : inconsistent dll linkage
        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see previous definition of 'malloc'
.\du3g.cpp(289) : warning C4565: 'free' : redefinition; the symbol was previously declared with __declspec(noalias)
.\du3g.cpp(289) : warning C4273: 'free' : inconsistent dll linkage
        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see previous definition of 'free'
.\du3g.cpp(1119) : warning C4065: switch statement contains 'default' but no 'case' labels
.\du3g.cpp(1256) : warning C4244: '=' : conversion from 'int' to 'short', possible loss of data
.\du3g.cpp(1426) : warning C4127: conditional expression is constant
.\du3g.cpp(1432) : warning C4065: switch statement contains 'default' but no 'case' labels
.\du3g.cpp(1608) : warning C4127: conditional expression is constant
.\du3g.cpp(1658) : warning C4127: conditional expression is constant
.\du3g.cpp(1658) : warning C4127: conditional expression is constant
e:\zaloha cecka\mlaskal3\public-rw\SWI098\du3\du3g.y(301) : warning C4100: 'ctx' : unreferenced formal parameter
Generating Code...
e:\zaloha cecka\mlaskal3\public-rw\swi098\du3\du3g.cpp(1548) : warning C4706: assignment within conditional expression
e:\zaloha cecka\mlaskal3\public-rw\swi098\du3\du3g.cpp(1312) : warning C4702: unreachable code
e:\zaloha cecka\mlaskal3\public-rw\swi098\du3\du3g.cpp(1611) : warning C4702: unreachable code
+ 5 klasickych "flexovych" varovani, mohli by ste sa na cviku v utorok spytat ze co s tym, lebo ja mam cviko az v sudy tyzden, dik.
Milujeme tých, čo nás odmietajú, odmietame tých, čo nás milujú.
qk
Matfyz(ák|ačka) level III
Příspěvky: 181
Registrován: 24. 2. 2005 10:03
Typ studia: Informatika Mgr.
Kontaktovat uživatele:

Příspěvek od qk »

budte radi ze jich mate tak malo :)

Kód: Vybrat vše

bison --report=all -d -o du3g.cpp public-rw/SWI098/du3/du3g.y
/opt/intel/compiler91/bin/icpc  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o du3.o -c public-ro/mlc/du3/src/du3.cpp
public-ro/common/h/carray.hpp(63): remark #1418: external function definition with no prior declaration
      bool operator==(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(67): remark #1418: external function definition with no prior declaration
      bool operator!=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(71): remark #1418: external function definition with no prior declaration
      bool operator<(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(75): remark #1418: external function definition with no prior declaration
      bool operator>(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(79): remark #1418: external function definition with no prior declaration
      bool operator<=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(83): remark #1418: external function definition with no prior declaration
      bool operator>=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/mlc/du3/src/du3.cpp(22): remark #1419: external declaration in primary source file
  extern FILE *yyin;
               ^

/opt/intel/compiler91/bin/icpc  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o du3g.o -c du3g.cpp
public-ro/common/h/carray.hpp(63): remark #1418: external function definition with no prior declaration
      bool operator==(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(67): remark #1418: external function definition with no prior declaration
      bool operator!=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(71): remark #1418: external function definition with no prior declaration
      bool operator<(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(75): remark #1418: external function definition with no prior declaration
      bool operator>(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(79): remark #1418: external function definition with no prior declaration
      bool operator<=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(83): remark #1418: external function definition with no prior declaration
      bool operator>=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

du3g.cpp(273): remark #193: zero used for undefined preprocessing identifier
  # if YYENABLE_NLS
       ^

du3g.cpp(912): remark #193: zero used for undefined preprocessing identifier
  # if YYLTYPE_IS_TRIVIAL
       ^

du3g.cpp(1377): remark #1419: external declaration in primary source file
  int yyparse (mlc::MlaskalCtx *ctx);
      ^

du3g.cpp(1492): remark #193: zero used for undefined preprocessing identifier
  #if YYLTYPE_IS_TRIVIAL
      ^

du3g.cpp(1509): remark #810: conversion from "int" to "yytype_int16={short}" may lose significant bits
    *yyssp = yystate;
           ^

du3g.cpp(1565): remark #111: statement is unreachable
        yyssp = yyss + yysize - 1;
        ^

public-rw/SWI098/du3/du3g.y(277): remark #869: parameter "ctx" was never referenced
  static void yyerror(unsigned *line, MlaskalCtx *ctx, const char *m)
                                                  ^

/opt/intel/compiler91/bin/icpc  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o du3baseerrtab.o -c public-ro/mlc/du3/src/du3baseerrtab.cpp
public-ro/common/h/carray.hpp(63): remark #1418: external function definition with no prior declaration
      bool operator==(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(67): remark #1418: external function definition with no prior declaration
      bool operator!=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(71): remark #1418: external function definition with no prior declaration
      bool operator<(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(75): remark #1418: external function definition with no prior declaration
      bool operator>(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(79): remark #1418: external function definition with no prior declaration
      bool operator<=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(83): remark #1418: external function definition with no prior declaration
      bool operator>=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

/opt/intel/compiler91/bin/icpc  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o duseemptyerrtab.o -c public-ro/mlc/src/dusememptyerrtab.cpp
public-ro/common/h/carray.hpp(63): remark #1418: external function definition with no prior declaration
      bool operator==(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(67): remark #1418: external function definition with no prior declaration
      bool operator!=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(71): remark #1418: external function definition with no prior declaration
      bool operator<(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(75): remark #1418: external function definition with no prior declaration
      bool operator>(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(79): remark #1418: external function definition with no prior declaration
      bool operator<=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(83): remark #1418: external function definition with no prior declaration
      bool operator>=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

/opt/intel/compiler91/bin/icpc  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o duerr.o -c public-ro/mlc/src/duerr.cpp
public-ro/common/h/carray.hpp(63): remark #1418: external function definition with no prior declaration
      bool operator==(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(67): remark #1418: external function definition with no prior declaration
      bool operator!=(const carray<T> &lhs, const carray<T> &rhs) {
public-ro/common/h/carray.hpp(71): remark #1418: external function definition with no prior declaration
      bool operator<(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(75): remark #1418: external function definition with no prior declaration
      bool operator>(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(79): remark #1418: external function definition with no prior declaration
      bool operator<=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(83): remark #1418: external function definition with no prior declaration
      bool operator>=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/mlc/src/duerr.cpp(35): remark #383: value copied to temporary, reference to temporary used
            bool rv = em_->insert(ERRMP(e.errc, &e)).second;
                                                ^

public-ro/mlc/src/duerr.cpp(35): remark #383: value copied to temporary, reference to temporary used
            bool rv = em_->insert(ERRMP(e.errc, &e)).second;
                                  ^

public-ro/mlc/src/duerr.cpp(59): remark #981: operands are evaluated in unspecified order
            for_each(base_errors.begin(), base_errors.end(), ftor_err_map_insert(err_map));
                                          ^

public-ro/mlc/src/duerr.cpp(59): remark #981: operands are evaluated in unspecified order
            for_each(base_errors.begin(), base_errors.end(), ftor_err_map_insert(err_map));
            ^

public-ro/mlc/src/duerr.cpp(60): remark #981: operands are evaluated in unspecified order
            for_each(sem_errors.begin(), sem_errors.end(), ftor_err_map_insert(err_map));
                                         ^

public-ro/mlc/src/duerr.cpp(60): remark #981: operands are evaluated in unspecified order
            for_each(sem_errors.begin(), sem_errors.end(), ftor_err_map_insert(err_map));
            ^

public-ro/mlc/src/duerr.cpp(78): remark #383: value copied to temporary, reference to temporary used
        if(mci!=err_map.end())
                ^

public-ro/common/h/carray.hpp(38): remark #981: operands are evaluated in unspecified order
        const_iterator end() const { return ptr_+n_; }
                                                ^
flex -Cf -b -p -p -o flex.cpp public-rw/SWI098/du3/du3l.lex
/opt/intel/compiler91/bin/icpc  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o flex.o -c flex.cpp
flex.cpp(34): remark #193: zero used for undefined preprocessing identifier
  #if __STDC_VERSION__ >= 199901L
      ^

flex.cpp(155): remark #1419: external declaration in primary source file
  extern int yyleng;
             ^

flex.cpp(157): remark #1419: external declaration in primary source file
  extern FILE *yyin, *yyout;
               ^

flex.cpp(157): remark #1419: external declaration in primary source file
  extern FILE *yyin, *yyout;
                      ^

flex.cpp(291): remark #1419: external declaration in primary source file
  void yyrestart (FILE *input_file  );
       ^

flex.cpp(292): remark #1419: external declaration in primary source file
  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
       ^

flex.cpp(293): remark #1419: external declaration in primary source file
  YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
                  ^

flex.cpp(294): remark #1419: external declaration in primary source file
  void yy_delete_buffer (YY_BUFFER_STATE b  );
       ^

flex.cpp(295): remark #1419: external declaration in primary source file
  void yy_flush_buffer (YY_BUFFER_STATE b  );
       ^

flex.cpp(296): remark #1419: external declaration in primary source file
  void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
       ^

flex.cpp(297): remark #1419: external declaration in primary source file
  void yypop_buffer_state (void );
       ^

flex.cpp(305): remark #1419: external declaration in primary source file
  YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
                  ^

flex.cpp(306): remark #1419: external declaration in primary source file
  YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
                  ^

flex.cpp(307): remark #1419: external declaration in primary source file
  YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
                  ^

flex.cpp(309): remark #1419: external declaration in primary source file
  void *yyalloc (yy_size_t  );
        ^

flex.cpp(310): remark #1419: external declaration in primary source file
  void *yyrealloc (void *,yy_size_t  );
        ^

flex.cpp(311): remark #1419: external declaration in primary source file
  void yyfree (void *  );
       ^

flex.cpp(348): remark #1419: external declaration in primary source file
  extern int yylineno;
             ^

flex.cpp(352): remark #1419: external declaration in primary source file
  extern char *yytext;
               ^

flex.cpp(5829): remark #1419: external declaration in primary source file
  extern int yy_flex_debug;
             ^

public-ro/common/h/carray.hpp(63): remark #1418: external function definition with no prior declaration
      bool operator==(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(67): remark #1418: external function definition with no prior declaration
      bool operator!=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(71): remark #1418: external function definition with no prior declaration
      bool operator<(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(75): remark #1418: external function definition with no prior declaration
      bool operator>(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(79): remark #1418: external function definition with no prior declaration
      bool operator<=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-ro/common/h/carray.hpp(83): remark #1418: external function definition with no prior declaration
      bool operator>=(const carray<T> &lhs, const carray<T> &rhs) {
           ^

public-rw/SWI098/du3/du3l.lex(107): remark #981: operands are evaluated in unspecified order
  {string val(yytext);transform(val.begin(), val.end(), val.begin(), (int(*)(int)) toupper);lv->id_ci_=ls_id.add(val);return DUTOK_IDENTIFIER;}
                                             ^

public-rw/SWI098/du3/du3l.lex(107): remark #981: operands are evaluated in unspecified order
  {string val(yytext);transform(val.begin(), val.end(), val.begin(), (int(*)(int)) toupper);lv->id_ci_=ls_id.add(val);return DUTOK_IDENTIFIER;}
                      ^

flex.cpp(6929): remark #111: statement is unreachable
                                        if ( ! (yy_did_buffer_switch_on_eof) )
                                        ^

flex.cpp(7330): remark #1418: external function definition with no prior declaration
  int yyget_lineno  (void)
      ^

flex.cpp(7339): remark #1418: external function definition with no prior declaration
  FILE *yyget_in  (void)
        ^

flex.cpp(7347): remark #1418: external function definition with no prior declaration
  FILE *yyget_out  (void)
        ^

flex.cpp(7355): remark #1418: external function definition with no prior declaration
  int yyget_leng  (void)
      ^

flex.cpp(7364): remark #1418: external function definition with no prior declaration
  char *yyget_text  (void)
        ^

flex.cpp(7373): remark #1418: external function definition with no prior declaration
  void yyset_lineno (int  line_number )
flex.cpp(7385): remark #1418: external function definition with no prior declaration
  void yyset_in (FILE *  in_str )
       ^

flex.cpp(7390): remark #1418: external function definition with no prior declaration
  void yyset_out (FILE *  out_str )
       ^

flex.cpp(7395): remark #1418: external function definition with no prior declaration
  int yyget_debug  (void)
      ^

flex.cpp(7400): remark #1418: external function definition with no prior declaration
  void yyset_debug (int  bdebug )
       ^

flex.cpp(7434): remark #1418: external function definition with no prior declaration
  int yylex_destroy  (void)
      ^

public-ro/common/h/literal_storage.hpp(46): remark #981: operands are evaluated in unspecified order
            const_iterator tmp=std::find(lit_.begin(), lit_.end(), sval);
                                                       ^

public-ro/common/h/literal_storage.hpp(48): remark #981: operands are evaluated in unspecified order
            if(tmp==lit_.end())         // not_found
                  ^

public-ro/common/h/literal_storage.hpp(51): remark #981: operands are evaluated in unspecified order
                tmp = --lit_.end();
                    ^

public-ro/common/h/literal_storage.hpp(46): remark #981: operands are evaluated in unspecified order
            const_iterator tmp=std::find(lit_.begin(), lit_.end(), sval);
                               ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=int]" 

public-ro/common/h/literal_storage.hpp(48): remark #383: value copied to temporary, reference to temporary used
            if(tmp==lit_.end())         // not_found
                    ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=int]" 

public-ro/common/h/literal_storage.hpp(51): remark #383: value copied to temporary, reference to temporary used
                tmp = --lit_.end();
                      ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=int]" 

public-ro/common/h/literal_storage.hpp(46): remark #981: operands are evaluated in unspecified order
            const_iterator tmp=std::find(lit_.begin(), lit_.end(), sval);
                               ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=double]" 

public-ro/common/h/literal_storage.hpp(48): remark #383: value copied to temporary, reference to temporary used
            if(tmp==lit_.end())         // not_found
                    ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=double]" 

public-ro/common/h/literal_storage.hpp(51): remark #383: value copied to temporary, reference to temporary used
                tmp = --lit_.end();
                      ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=double]" 

public-ro/common/h/literal_storage.hpp(46): remark #981: operands are evaluated in unspecified order
            const_iterator tmp=std::find(lit_.begin(), lit_.end(), sval);
                               ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=std::string]" 

public-ro/common/h/literal_storage.hpp(48): remark #383: value copied to temporary, reference to temporary used
            if(tmp==lit_.end())         // not_found
                    ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=std::string]" 

public-ro/common/h/literal_storage.hpp(51): remark #383: value copied to temporary, reference to temporary used
                tmp = --lit_.end();
                      ^
          detected during instantiation of "mlaskal::lit_storage<T>::const_iterator mlaskal::lit_storage<T>::add(const T &) [with T=std::string]" 

/opt/intel/compiler91/bin/icpc  -o program du3.o du3baseerrtab.o flex.o duseemptyerrtab.o duerr.o du3g.o

:lol:
Don't worry, be dead
qk
Matfyz(ák|ačka) level III
Příspěvky: 181
Registrován: 24. 2. 2005 10:03
Typ studia: Informatika Mgr.
Kontaktovat uživatele:

Příspěvek od qk »

g++ je mirnejsi :)

Kód: Vybrat vše

bison --report=all -d -o du3g.cpp public-rw/SWI098/du3/du3g.y
g++  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o du3.o -c public-ro/mlc/du3/src/du3.cpp
g++  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o du3g.o -c du3g.cpp
g++  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o du3baseerrtab.o -c public-ro/mlc/du3/src/du3baseerrtab.cpp
g++  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o duseemptyerrtab.o -c public-ro/mlc/src/dusememptyerrtab.cpp
g++  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o duerr.o -c public-ro/mlc/src/duerr.cpp
flex -Cf -b -p -p -o flex.cpp public-rw/SWI098/du3/du3l.lex
g++  -Wall -Ipublic-ro/mlc/du3/h/ -Ipublic-ro/mlc/h/ -Ipublic-ro/common/h/ -I. -o flex.o -c flex.cpp
public-rw/SWI098/du3/du3l.lex:279: warning: this decimal constant is unsigned only in ISO C90
flex.cpp: In function 'int yy_get_next_buffer()':
flex.cpp:6808: warning: comparison between signed and unsigned integer expressions
public-rw/SWI098/du3/du3l.lex: In function 'bool convertUI(const char*, unsigned int, int&)':
public-rw/SWI098/du3/du3l.lex:288: warning: comparison between signed and unsigned integer expressions
g++  -o program du3.o du3baseerrtab.o flex.o duseemptyerrtab.o duerr.o du3g.o
Naposledy upravil(a) qk dne 19. 11. 2006 12:22, celkem upraveno 1 x.
Don't worry, be dead
qk
Matfyz(ák|ačka) level III
Příspěvky: 181
Registrován: 24. 2. 2005 10:03
Typ studia: Informatika Mgr.
Kontaktovat uživatele:

Příspěvek od qk »

dvojcvak
Don't worry, be dead
LuKu
Matfyz(ák|ačka) level III
Příspěvky: 117
Registrován: 15. 1. 2005 18:29
Typ studia: Informatika Mgr.

Příspěvek od LuKu »

lavor píše:takze po odstraneni konfliktov mi hadze visual studio 16 "bisonich" varovani:
...
+ 5 klasickych "flexovych" varovani, mohli by ste sa na cviku v utorok spytat ze co s tym, lebo ja mam cviko az v sudy tyzden, dik.
Já mám přesně ta samá a teď jsem si všimla, že rastik psal na začátku taky o 16-ti, takže to snad bude OK... Ale pokud by se v úterý někdo zeptal, bylo by to super :wink: A nejlepší by bylo, kdyby se zeptal přímo Yaghoba, protože jak jsme zjistili na přednášce, to, co řekne Bednárek, nemusí tak úplně platit...
Odpovědět

Zpět na „2006“