Mercurial > octave-dspies
comparison src/lex.l @ 8974:fde2a916b2ac
include line and file info in parser warnings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 13 Mar 2009 10:26:59 -0400 |
parents | d865363208d6 |
children | 29563379fa9b |
comparison
equal
deleted
inserted
replaced
8973:ddea8b06ed7c | 8974:fde2a916b2ac |
---|---|
3375 } | 3375 } |
3376 | 3376 |
3377 static void | 3377 static void |
3378 gripe_matlab_incompatible (const std::string& msg) | 3378 gripe_matlab_incompatible (const std::string& msg) |
3379 { | 3379 { |
3380 warning_with_id ("Octave:matlab-incompatible", | 3380 std::string nm = curr_fcn_file_full_name; |
3381 "potential Matlab compatibility problem: %s", | 3381 |
3382 msg.c_str ()); | 3382 if (nm.empty ()) |
3383 warning_with_id ("Octave:matlab-incompatible", | |
3384 "potential Matlab compatibility problem: %s", | |
3385 msg.c_str ()); | |
3386 else | |
3387 warning_with_id ("Octave:matlab-incompatible", | |
3388 "potential Matlab compatibility problem: %s near line %d offile %s", | |
3389 msg.c_str (), input_line_number, nm.c_str ()); | |
3383 } | 3390 } |
3384 | 3391 |
3385 static void | 3392 static void |
3386 maybe_gripe_matlab_incompatible_comment (char c) | 3393 maybe_gripe_matlab_incompatible_comment (char c) |
3387 { | 3394 { |